@haibun/core 3.0.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/currentVersion.d.ts +1 -1
- package/build/currentVersion.js +1 -2
- package/build/lib/EventLogger.d.ts +22 -0
- package/build/lib/EventLogger.d.ts.map +1 -0
- package/build/lib/EventLogger.js +95 -0
- package/build/lib/EventLogger.js.map +1 -0
- package/build/lib/Logger.d.ts.map +1 -1
- package/build/lib/Logger.js +2 -1
- package/build/lib/Logger.js.map +1 -1
- package/build/lib/astepper.d.ts +11 -1
- package/build/lib/astepper.d.ts.map +1 -1
- package/build/lib/astepper.js +8 -0
- package/build/lib/astepper.js.map +1 -1
- package/build/lib/core/flow-runner.d.ts +25 -0
- package/build/lib/core/flow-runner.d.ts.map +1 -0
- package/build/lib/core/flow-runner.js +128 -0
- package/build/lib/core/flow-runner.js.map +1 -0
- package/build/lib/core/protocol.d.ts +58 -0
- package/build/lib/core/protocol.d.ts.map +1 -0
- package/build/lib/core/protocol.js +18 -0
- package/build/lib/core/protocol.js.map +1 -0
- package/build/lib/core-domains.d.ts +2 -16
- package/build/lib/core-domains.d.ts.map +1 -1
- package/build/lib/core-domains.js +46 -27
- package/build/lib/core-domains.js.map +1 -1
- package/build/lib/defs.d.ts +42 -11
- package/build/lib/defs.d.ts.map +1 -1
- package/build/lib/defs.js +6 -1
- package/build/lib/defs.js.map +1 -1
- package/build/lib/domain-types.d.ts +12 -1
- package/build/lib/domain-types.d.ts.map +1 -1
- package/build/lib/domain-types.js +63 -3
- package/build/lib/domain-types.js.map +1 -1
- package/build/lib/event-bridge.d.ts +28 -0
- package/build/lib/event-bridge.d.ts.map +1 -0
- package/build/lib/event-bridge.js +114 -0
- package/build/lib/event-bridge.js.map +1 -0
- package/build/lib/feature-variables.d.ts +14 -0
- package/build/lib/feature-variables.d.ts.map +1 -1
- package/build/lib/feature-variables.js +128 -6
- package/build/lib/feature-variables.js.map +1 -1
- package/build/lib/interfaces/logger.d.ts +19 -3
- package/build/lib/interfaces/logger.d.ts.map +1 -1
- package/build/lib/interfaces/logger.js +11 -1
- package/build/lib/interfaces/logger.js.map +1 -1
- package/build/lib/namedVars.d.ts.map +1 -1
- package/build/lib/namedVars.js +18 -10
- package/build/lib/namedVars.js.map +1 -1
- package/build/lib/populateActionArgs.d.ts +1 -1
- package/build/lib/populateActionArgs.d.ts.map +1 -1
- package/build/lib/populateActionArgs.js +11 -49
- package/build/lib/populateActionArgs.js.map +1 -1
- package/build/lib/test/TestSteps.d.ts +1 -0
- package/build/lib/test/TestSteps.d.ts.map +1 -1
- package/build/lib/test/TestStepsWithOptions.d.ts +1 -0
- package/build/lib/test/TestStepsWithOptions.d.ts.map +1 -1
- package/build/lib/test/lib.d.ts.map +1 -1
- package/build/lib/test/lib.js +2 -0
- package/build/lib/test/lib.js.map +1 -1
- package/build/lib/util/actualURI.js +1 -1
- package/build/lib/util/actualURI.js.map +1 -1
- package/build/lib/util/index.d.ts +11 -2
- package/build/lib/util/index.d.ts.map +1 -1
- package/build/lib/util/index.js +46 -2
- package/build/lib/util/index.js.map +1 -1
- package/build/lib/util/variables.d.ts +9 -0
- package/build/lib/util/variables.d.ts.map +1 -0
- package/build/lib/util/variables.js +40 -0
- package/build/lib/util/variables.js.map +1 -0
- package/build/lib/util/workspace-lib.d.ts.map +1 -1
- package/build/lib/util/workspace-lib.js +30 -3
- package/build/lib/util/workspace-lib.js.map +1 -1
- package/build/monitor/browser-stubs.d.ts +12 -0
- package/build/monitor/browser-stubs.d.ts.map +1 -0
- package/build/monitor/browser-stubs.js +20 -0
- package/build/monitor/browser-stubs.js.map +1 -0
- package/build/monitor/constants.d.ts +9 -0
- package/build/monitor/constants.d.ts.map +1 -0
- package/build/monitor/constants.js +9 -0
- package/build/monitor/constants.js.map +1 -0
- package/build/monitor/event-view.d.ts +40 -0
- package/build/monitor/event-view.d.ts.map +1 -0
- package/build/monitor/event-view.js +104 -0
- package/build/monitor/event-view.js.map +1 -0
- package/build/monitor/filters.d.ts +17 -0
- package/build/monitor/filters.d.ts.map +1 -0
- package/build/monitor/filters.js +32 -0
- package/build/monitor/filters.js.map +1 -0
- package/build/monitor/formatters.d.ts +27 -0
- package/build/monitor/formatters.d.ts.map +1 -0
- package/build/monitor/formatters.js +89 -0
- package/build/monitor/formatters.js.map +1 -0
- package/build/monitor/index.d.ts +11 -0
- package/build/monitor/index.d.ts.map +1 -0
- package/build/monitor/index.js +15 -0
- package/build/monitor/index.js.map +1 -0
- package/build/monitor/jit-serialization.d.ts +9 -0
- package/build/monitor/jit-serialization.d.ts.map +1 -0
- package/build/monitor/jit-serialization.js +73 -0
- package/build/monitor/jit-serialization.js.map +1 -0
- package/build/monitor/monitor-types.d.ts +119 -0
- package/build/monitor/monitor-types.d.ts.map +1 -0
- package/build/monitor/monitor-types.js +43 -0
- package/build/monitor/monitor-types.js.map +1 -0
- package/build/monitor/speculative-tracker.d.ts +20 -0
- package/build/monitor/speculative-tracker.d.ts.map +1 -0
- package/build/monitor/speculative-tracker.js +38 -0
- package/build/monitor/speculative-tracker.js.map +1 -0
- package/build/monitor/state.d.ts +31 -0
- package/build/monitor/state.d.ts.map +1 -0
- package/build/monitor/state.js +110 -0
- package/build/monitor/state.js.map +1 -0
- package/build/monitor/timer.d.ts +11 -0
- package/build/monitor/timer.d.ts.map +1 -0
- package/build/monitor/timer.js +13 -0
- package/build/monitor/timer.js.map +1 -0
- package/build/monitor/tree-builder.d.ts +25 -0
- package/build/monitor/tree-builder.d.ts.map +1 -0
- package/build/monitor/tree-builder.js +36 -0
- package/build/monitor/tree-builder.js.map +1 -0
- package/build/phases/Executor.d.ts.map +1 -1
- package/build/phases/Executor.js +102 -43
- package/build/phases/Executor.js.map +1 -1
- package/build/phases/Resolver.d.ts +2 -1
- package/build/phases/Resolver.d.ts.map +1 -1
- package/build/phases/Resolver.js +64 -1
- package/build/phases/Resolver.js.map +1 -1
- package/build/runner.d.ts.map +1 -1
- package/build/runner.js +5 -0
- package/build/runner.js.map +1 -1
- package/build/schema/events.d.ts +174 -0
- package/build/schema/events.d.ts.map +1 -0
- package/build/schema/events.js +55 -0
- package/build/schema/events.js.map +1 -0
- package/build/steps/activities-stepper.d.ts +55 -20
- package/build/steps/activities-stepper.d.ts.map +1 -1
- package/build/steps/activities-stepper.js +342 -207
- package/build/steps/activities-stepper.js.map +1 -1
- package/build/steps/conformance.d.ts +1 -0
- package/build/steps/conformance.d.ts.map +1 -1
- package/build/steps/console-monitor-stepper.d.ts +44 -0
- package/build/steps/console-monitor-stepper.d.ts.map +1 -0
- package/build/steps/console-monitor-stepper.js +106 -0
- package/build/steps/console-monitor-stepper.js.map +1 -0
- package/build/steps/debugger-stepper.d.ts +5 -3
- package/build/steps/debugger-stepper.d.ts.map +1 -1
- package/build/steps/debugger-stepper.js +35 -11
- package/build/steps/debugger-stepper.js.map +1 -1
- package/build/steps/haibun.d.ts +11 -18
- package/build/steps/haibun.d.ts.map +1 -1
- package/build/steps/haibun.js +51 -55
- package/build/steps/haibun.js.map +1 -1
- package/build/steps/lib/tts.d.ts.map +1 -1
- package/build/steps/lib/tts.js +2 -1
- package/build/steps/lib/tts.js.map +1 -1
- package/build/steps/logic-stepper.d.ts +42 -0
- package/build/steps/logic-stepper.d.ts.map +1 -0
- package/build/steps/logic-stepper.js +143 -0
- package/build/steps/logic-stepper.js.map +1 -0
- package/build/steps/narrator.d.ts.map +1 -1
- package/build/steps/narrator.js +1 -1
- package/build/steps/narrator.js.map +1 -1
- package/build/steps/parse.d.ts +1 -0
- package/build/steps/parse.d.ts.map +1 -1
- package/build/steps/variables-stepper.d.ts +11 -71
- package/build/steps/variables-stepper.d.ts.map +1 -1
- package/build/steps/variables-stepper.js +534 -84
- package/build/steps/variables-stepper.js.map +1 -1
- package/package.json +16 -3
- package/build/applyEffectFeatures.d.ts +0 -4
- package/build/applyEffectFeatures.d.ts.map +0 -1
- package/build/applyEffectFeatures.js +0 -31
- package/build/applyEffectFeatures.js.map +0 -1
- package/build/jsprolog/converter.d.ts +0 -9
- package/build/jsprolog/converter.d.ts.map +0 -1
- package/build/jsprolog/converter.js +0 -42
- package/build/jsprolog/converter.js.map +0 -1
- package/build/jsprolog/stepper-utils.d.ts +0 -8
- package/build/jsprolog/stepper-utils.d.ts.map +0 -1
- package/build/jsprolog/stepper-utils.js +0 -8
- package/build/jsprolog/stepper-utils.js.map +0 -1
- package/build/jsprolog/test.jsprolog.d.ts +0 -4
- package/build/jsprolog/test.jsprolog.d.ts.map +0 -1
- package/build/jsprolog/test.jsprolog.js +0 -19
- package/build/jsprolog/test.jsprolog.js.map +0 -1
- package/build/jsprolog/test.kireji.d.ts +0 -4
- package/build/jsprolog/test.kireji.d.ts.map +0 -1
- package/build/jsprolog/test.kireji.js +0 -19
- package/build/jsprolog/test.kireji.js.map +0 -1
- package/build/jsprolog/withAction.d.ts +0 -32
- package/build/jsprolog/withAction.d.ts.map +0 -1
- package/build/jsprolog/withAction.js +0 -65
- package/build/jsprolog/withAction.js.map +0 -1
- package/build/kireji/test.kireji.d.ts +0 -4
- package/build/kireji/test.kireji.d.ts.map +0 -1
- package/build/kireji/test.kireji.js +0 -19
- package/build/kireji/test.kireji.js.map +0 -1
- package/build/lib/errors.d.ts +0 -13
- package/build/lib/errors.d.ts.map +0 -1
- package/build/lib/errors.js +0 -18
- package/build/lib/errors.js.map +0 -1
- package/build/lib/util/featureStep-executor.d.ts +0 -7
- package/build/lib/util/featureStep-executor.d.ts.map +0 -1
- package/build/lib/util/featureStep-executor.js +0 -63
- package/build/lib/util/featureStep-executor.js.map +0 -1
- package/build/steps/conditions-stepper.d.ts +0 -27
- package/build/steps/conditions-stepper.d.ts.map +0 -1
- package/build/steps/conditions-stepper.js +0 -99
- package/build/steps/conditions-stepper.js.map +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BaseEvent: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
timestamp: z.ZodNumber;
|
|
5
|
+
source: z.ZodDefault<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const LifecycleEvent: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
timestamp: z.ZodNumber;
|
|
10
|
+
source: z.ZodDefault<z.ZodString>;
|
|
11
|
+
kind: z.ZodLiteral<"lifecycle">;
|
|
12
|
+
type: z.ZodEnum<{
|
|
13
|
+
feature: "feature";
|
|
14
|
+
scenario: "scenario";
|
|
15
|
+
step: "step";
|
|
16
|
+
activity: "activity";
|
|
17
|
+
waypoint: "waypoint";
|
|
18
|
+
ensure: "ensure";
|
|
19
|
+
execution: "execution";
|
|
20
|
+
}>;
|
|
21
|
+
stage: z.ZodEnum<{
|
|
22
|
+
start: "start";
|
|
23
|
+
end: "end";
|
|
24
|
+
}>;
|
|
25
|
+
stepperName: z.ZodOptional<z.ZodString>;
|
|
26
|
+
actionName: z.ZodOptional<z.ZodString>;
|
|
27
|
+
label: z.ZodOptional<z.ZodString>;
|
|
28
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
running: "running";
|
|
30
|
+
completed: "completed";
|
|
31
|
+
failed: "failed";
|
|
32
|
+
skipped: "skipped";
|
|
33
|
+
}>>;
|
|
34
|
+
error: z.ZodOptional<z.ZodString>;
|
|
35
|
+
intent: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
authoritative: "authoritative";
|
|
38
|
+
speculative: "speculative";
|
|
39
|
+
}>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const LogEvent: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
timestamp: z.ZodNumber;
|
|
45
|
+
source: z.ZodDefault<z.ZodString>;
|
|
46
|
+
kind: z.ZodLiteral<"log">;
|
|
47
|
+
level: z.ZodEnum<{
|
|
48
|
+
error: "error";
|
|
49
|
+
trace: "trace";
|
|
50
|
+
debug: "debug";
|
|
51
|
+
info: "info";
|
|
52
|
+
warn: "warn";
|
|
53
|
+
}>;
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export declare const ArtifactEvent: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
timestamp: z.ZodNumber;
|
|
60
|
+
source: z.ZodDefault<z.ZodString>;
|
|
61
|
+
kind: z.ZodLiteral<"artifact">;
|
|
62
|
+
artifactType: z.ZodEnum<{
|
|
63
|
+
file: "file";
|
|
64
|
+
video: "video";
|
|
65
|
+
image: "image";
|
|
66
|
+
html: "html";
|
|
67
|
+
json: "json";
|
|
68
|
+
"network-trace": "network-trace";
|
|
69
|
+
terminal: "terminal";
|
|
70
|
+
}>;
|
|
71
|
+
mimetype: z.ZodString;
|
|
72
|
+
path: z.ZodOptional<z.ZodString>;
|
|
73
|
+
isTimeLined: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const ControlEvent: z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
timestamp: z.ZodNumber;
|
|
79
|
+
source: z.ZodDefault<z.ZodString>;
|
|
80
|
+
kind: z.ZodLiteral<"control">;
|
|
81
|
+
signal: z.ZodEnum<{
|
|
82
|
+
"graph-link": "graph-link";
|
|
83
|
+
break: "break";
|
|
84
|
+
pause: "pause";
|
|
85
|
+
resume: "resume";
|
|
86
|
+
}>;
|
|
87
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export declare const HaibunEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
timestamp: z.ZodNumber;
|
|
92
|
+
source: z.ZodDefault<z.ZodString>;
|
|
93
|
+
kind: z.ZodLiteral<"lifecycle">;
|
|
94
|
+
type: z.ZodEnum<{
|
|
95
|
+
feature: "feature";
|
|
96
|
+
scenario: "scenario";
|
|
97
|
+
step: "step";
|
|
98
|
+
activity: "activity";
|
|
99
|
+
waypoint: "waypoint";
|
|
100
|
+
ensure: "ensure";
|
|
101
|
+
execution: "execution";
|
|
102
|
+
}>;
|
|
103
|
+
stage: z.ZodEnum<{
|
|
104
|
+
start: "start";
|
|
105
|
+
end: "end";
|
|
106
|
+
}>;
|
|
107
|
+
stepperName: z.ZodOptional<z.ZodString>;
|
|
108
|
+
actionName: z.ZodOptional<z.ZodString>;
|
|
109
|
+
label: z.ZodOptional<z.ZodString>;
|
|
110
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
running: "running";
|
|
112
|
+
completed: "completed";
|
|
113
|
+
failed: "failed";
|
|
114
|
+
skipped: "skipped";
|
|
115
|
+
}>>;
|
|
116
|
+
error: z.ZodOptional<z.ZodString>;
|
|
117
|
+
intent: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
authoritative: "authoritative";
|
|
120
|
+
speculative: "speculative";
|
|
121
|
+
}>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
timestamp: z.ZodNumber;
|
|
126
|
+
source: z.ZodDefault<z.ZodString>;
|
|
127
|
+
kind: z.ZodLiteral<"log">;
|
|
128
|
+
level: z.ZodEnum<{
|
|
129
|
+
error: "error";
|
|
130
|
+
trace: "trace";
|
|
131
|
+
debug: "debug";
|
|
132
|
+
info: "info";
|
|
133
|
+
warn: "warn";
|
|
134
|
+
}>;
|
|
135
|
+
message: z.ZodString;
|
|
136
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
timestamp: z.ZodNumber;
|
|
140
|
+
source: z.ZodDefault<z.ZodString>;
|
|
141
|
+
kind: z.ZodLiteral<"artifact">;
|
|
142
|
+
artifactType: z.ZodEnum<{
|
|
143
|
+
file: "file";
|
|
144
|
+
video: "video";
|
|
145
|
+
image: "image";
|
|
146
|
+
html: "html";
|
|
147
|
+
json: "json";
|
|
148
|
+
"network-trace": "network-trace";
|
|
149
|
+
terminal: "terminal";
|
|
150
|
+
}>;
|
|
151
|
+
mimetype: z.ZodString;
|
|
152
|
+
path: z.ZodOptional<z.ZodString>;
|
|
153
|
+
isTimeLined: z.ZodDefault<z.ZodBoolean>;
|
|
154
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
timestamp: z.ZodNumber;
|
|
158
|
+
source: z.ZodDefault<z.ZodString>;
|
|
159
|
+
kind: z.ZodLiteral<"control">;
|
|
160
|
+
signal: z.ZodEnum<{
|
|
161
|
+
"graph-link": "graph-link";
|
|
162
|
+
break: "break";
|
|
163
|
+
pause: "pause";
|
|
164
|
+
resume: "resume";
|
|
165
|
+
}>;
|
|
166
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
167
|
+
}, z.core.$strip>], "kind">;
|
|
168
|
+
export type TBaseEvent = z.infer<typeof BaseEvent>;
|
|
169
|
+
export type TLifecycleEvent = z.infer<typeof LifecycleEvent>;
|
|
170
|
+
export type TLogEvent = z.infer<typeof LogEvent>;
|
|
171
|
+
export type TArtifactEvent = z.infer<typeof ArtifactEvent>;
|
|
172
|
+
export type TControlEvent = z.infer<typeof ControlEvent>;
|
|
173
|
+
export type THaibunEvent = z.infer<typeof HaibunEvent>;
|
|
174
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/schema/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,SAAS;;;;iBAIpB,CAAC;AAGH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBzB,CAAC;AAGH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;iBAKnB,CAAC;AAGH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;iBASxB,CAAC;AAGH,eAAO,MAAM,YAAY;;;;;;;;;;;;iBAIvB,CAAC;AAGH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAKtB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AACjD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Base Protocol
|
|
3
|
+
export const BaseEvent = z.object({
|
|
4
|
+
id: z.string().describe('Unique identifier for the event, typically the seqPath'),
|
|
5
|
+
timestamp: z.number().int().describe('Absolute epoch timestamp in milliseconds'),
|
|
6
|
+
source: z.string().default('haibun').describe('Source of the event'),
|
|
7
|
+
});
|
|
8
|
+
// Lifecycle Events
|
|
9
|
+
export const LifecycleEvent = BaseEvent.extend({
|
|
10
|
+
kind: z.literal('lifecycle'),
|
|
11
|
+
type: z.enum(['feature', 'scenario', 'step', 'activity', 'waypoint', 'ensure', 'execution']),
|
|
12
|
+
stage: z.enum(['start', 'end']),
|
|
13
|
+
// Reference info
|
|
14
|
+
stepperName: z.string().optional(),
|
|
15
|
+
actionName: z.string().optional(),
|
|
16
|
+
label: z.string().optional(),
|
|
17
|
+
// Execution Context
|
|
18
|
+
status: z.enum(['running', 'completed', 'failed', 'skipped']).optional(),
|
|
19
|
+
error: z.string().optional(),
|
|
20
|
+
// Execution Intent
|
|
21
|
+
intent: z.object({
|
|
22
|
+
mode: z.enum(['speculative', 'authoritative']).optional()
|
|
23
|
+
}).optional(),
|
|
24
|
+
});
|
|
25
|
+
// Log Events
|
|
26
|
+
export const LogEvent = BaseEvent.extend({
|
|
27
|
+
kind: z.literal('log'),
|
|
28
|
+
level: z.enum(['trace', 'debug', 'info', 'warn', 'error']),
|
|
29
|
+
message: z.string(),
|
|
30
|
+
payload: z.record(z.string(), z.unknown()).optional(), // Interactive inspector data
|
|
31
|
+
});
|
|
32
|
+
// Artifact Events
|
|
33
|
+
export const ArtifactEvent = BaseEvent.extend({
|
|
34
|
+
kind: z.literal('artifact'),
|
|
35
|
+
artifactType: z.enum(['video', 'image', 'html', 'json', 'file', 'network-trace', 'terminal']),
|
|
36
|
+
mimetype: z.string(),
|
|
37
|
+
path: z.string().optional(),
|
|
38
|
+
// Metadata for the UI
|
|
39
|
+
isTimeLined: z.boolean().default(false),
|
|
40
|
+
duration: z.number().optional(),
|
|
41
|
+
});
|
|
42
|
+
// Control Events
|
|
43
|
+
export const ControlEvent = BaseEvent.extend({
|
|
44
|
+
kind: z.literal('control'),
|
|
45
|
+
signal: z.enum(['graph-link', 'break', 'pause', 'resume']),
|
|
46
|
+
payload: z.record(z.string(), z.unknown()),
|
|
47
|
+
});
|
|
48
|
+
// Union Type
|
|
49
|
+
export const HaibunEvent = z.discriminatedUnion('kind', [
|
|
50
|
+
LifecycleEvent,
|
|
51
|
+
LogEvent,
|
|
52
|
+
ArtifactEvent,
|
|
53
|
+
ControlEvent
|
|
54
|
+
]);
|
|
55
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/schema/events.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,10 +2,9 @@ import { AStepper, IHasCycles, TStepperSteps } from '../lib/astepper.js';
|
|
|
2
2
|
import { TStepArgs, TFeatureStep, TWorld, IStepperCycles, TStepperStep, TFeatures } from '../lib/defs.js';
|
|
3
3
|
type TActivitiesFixedSteps = {
|
|
4
4
|
activity: TStepperStep;
|
|
5
|
-
|
|
5
|
+
waypointWithProof: TStepperStep;
|
|
6
|
+
waypointLabel: TStepperStep;
|
|
6
7
|
ensure: TStepperStep;
|
|
7
|
-
forget: TStepperStep;
|
|
8
|
-
waypointed: TStepperStep;
|
|
9
8
|
showWaypoints: TStepperStep;
|
|
10
9
|
};
|
|
11
10
|
type TActivitiesStepperSteps = TStepperSteps & TActivitiesFixedSteps;
|
|
@@ -14,46 +13,77 @@ type TActivitiesStepperSteps = TStepperSteps & TActivitiesFixedSteps;
|
|
|
14
13
|
* implements this logic: P ∨ (¬P ∧ [A]P)
|
|
15
14
|
*/
|
|
16
15
|
export declare class ActivitiesStepper extends AStepper implements IHasCycles {
|
|
17
|
-
private
|
|
16
|
+
private runner;
|
|
18
17
|
private backgroundOutcomePatterns;
|
|
19
18
|
private featureOutcomePatterns;
|
|
20
19
|
private outcomeToFeaturePath;
|
|
20
|
+
private featureSteps;
|
|
21
21
|
private currentFeaturePath;
|
|
22
22
|
private lastFeaturePath;
|
|
23
|
+
private lastResolutionPath;
|
|
23
24
|
private ensuredInstances;
|
|
24
|
-
private
|
|
25
|
-
|
|
25
|
+
private ensureAttempts;
|
|
26
|
+
private registeredOutcomeMetadata;
|
|
27
|
+
private inActivityBlock;
|
|
28
|
+
cycles: IStepperCycles;
|
|
29
|
+
cyclesWhen: {
|
|
30
|
+
startExecution: number;
|
|
31
|
+
startFeature: number;
|
|
32
|
+
};
|
|
33
|
+
readonly baseSteps: {
|
|
26
34
|
readonly activity: {
|
|
27
35
|
readonly gwta: "Activity: {activity}";
|
|
28
36
|
readonly action: () => import("../lib/defs.js").TOKActionResult;
|
|
37
|
+
readonly resolveFeatureLine: (line: string, path: string, _stepper: AStepper, _backgrounds: TFeatures, allLines?: string[], lineIndex?: number) => boolean;
|
|
29
38
|
};
|
|
30
|
-
readonly
|
|
39
|
+
readonly waypointWithProof: {
|
|
31
40
|
readonly gwta: "waypoint {outcome} with {proof:statement}";
|
|
32
|
-
readonly
|
|
41
|
+
readonly precludes: ["ActivitiesStepper.waypointLabel"];
|
|
33
42
|
readonly action: ({ proof }: {
|
|
34
43
|
proof: TFeatureStep[];
|
|
35
44
|
}, featureStep: TFeatureStep) => Promise<import("../lib/defs.js").TNotOKActionResult | import("../lib/defs.js").TOKActionResult>;
|
|
36
45
|
};
|
|
46
|
+
readonly waypointLabel: {
|
|
47
|
+
readonly gwta: "waypoint {outcome}";
|
|
48
|
+
readonly action: () => Promise<import("../lib/defs.js").TOKActionResult>;
|
|
49
|
+
};
|
|
37
50
|
readonly ensure: {
|
|
38
|
-
readonly description: "Ensure a waypoint condition by always running the proof. If proof passes, waypoint is already satisfied. If proof fails, run the full activity
|
|
51
|
+
readonly description: "Ensure a waypoint condition by always running the proof. If proof passes, waypoint is already satisfied. If proof fails, run the full activity, then try the proof again";
|
|
39
52
|
readonly gwta: "ensure {outcome:statement}";
|
|
53
|
+
readonly unique: true;
|
|
40
54
|
readonly action: ({ outcome }: {
|
|
41
55
|
outcome: TFeatureStep[];
|
|
42
56
|
}, featureStep: TFeatureStep) => Promise<import("../lib/defs.js").TNotOKActionResult | import("../lib/defs.js").TOKActionResult>;
|
|
43
57
|
};
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly action: ({ outcome }: {
|
|
48
|
-
outcome: TFeatureStep[];
|
|
49
|
-
}, featureStep: TFeatureStep) => import("../lib/defs.js").TOKActionResult;
|
|
58
|
+
readonly showWaypoints: {
|
|
59
|
+
readonly exact: "show waypoints";
|
|
60
|
+
readonly action: (_args: TStepArgs, featureStep: TFeatureStep) => Promise<import("../lib/defs.js").TOKActionResult>;
|
|
50
61
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
};
|
|
63
|
+
readonly typedSteps: {
|
|
64
|
+
readonly activity: {
|
|
65
|
+
readonly gwta: "Activity: {activity}";
|
|
66
|
+
readonly action: () => import("../lib/defs.js").TOKActionResult;
|
|
67
|
+
readonly resolveFeatureLine: (line: string, path: string, _stepper: AStepper, _backgrounds: TFeatures, allLines?: string[], lineIndex?: number) => boolean;
|
|
68
|
+
};
|
|
69
|
+
readonly waypointWithProof: {
|
|
70
|
+
readonly gwta: "waypoint {outcome} with {proof:statement}";
|
|
71
|
+
readonly precludes: ["ActivitiesStepper.waypointLabel"];
|
|
72
|
+
readonly action: ({ proof }: {
|
|
73
|
+
proof: TFeatureStep[];
|
|
74
|
+
}, featureStep: TFeatureStep) => Promise<import("../lib/defs.js").TNotOKActionResult | import("../lib/defs.js").TOKActionResult>;
|
|
75
|
+
};
|
|
76
|
+
readonly waypointLabel: {
|
|
77
|
+
readonly gwta: "waypoint {outcome}";
|
|
78
|
+
readonly action: () => Promise<import("../lib/defs.js").TOKActionResult>;
|
|
79
|
+
};
|
|
80
|
+
readonly ensure: {
|
|
81
|
+
readonly description: "Ensure a waypoint condition by always running the proof. If proof passes, waypoint is already satisfied. If proof fails, run the full activity, then try the proof again";
|
|
82
|
+
readonly gwta: "ensure {outcome:statement}";
|
|
83
|
+
readonly unique: true;
|
|
54
84
|
readonly action: ({ outcome }: {
|
|
55
85
|
outcome: TFeatureStep[];
|
|
56
|
-
}) => import("../lib/defs.js").TOKActionResult
|
|
86
|
+
}, featureStep: TFeatureStep) => Promise<import("../lib/defs.js").TNotOKActionResult | import("../lib/defs.js").TOKActionResult>;
|
|
57
87
|
};
|
|
58
88
|
readonly showWaypoints: {
|
|
59
89
|
readonly exact: "show waypoints";
|
|
@@ -61,7 +91,6 @@ export declare class ActivitiesStepper extends AStepper implements IHasCycles {
|
|
|
61
91
|
};
|
|
62
92
|
};
|
|
63
93
|
steps: TActivitiesStepperSteps;
|
|
64
|
-
cycles: IStepperCycles;
|
|
65
94
|
setWorld(world: TWorld, steppers: AStepper[]): Promise<void>;
|
|
66
95
|
/**
|
|
67
96
|
* Register a dynamic outcome step.
|
|
@@ -74,6 +103,12 @@ export declare class ActivitiesStepper extends AStepper implements IHasCycles {
|
|
|
74
103
|
* @param activityBlockSteps - Optional array of all steps in the containing activity block
|
|
75
104
|
*/
|
|
76
105
|
registerOutcome(outcome: string, proofStatements: string[], proofPath: string, isBackground?: boolean, activityBlockSteps?: string[]): void;
|
|
106
|
+
/**
|
|
107
|
+
* Re-emit GRAPH_LINK messages for waypoint metadata.
|
|
108
|
+
* MonitorHandler subscribes after resolution, so we retransmit stored metadata.
|
|
109
|
+
*/
|
|
110
|
+
sendGraphLinkMessages(): void;
|
|
111
|
+
private resolveWaypointCommon;
|
|
77
112
|
}
|
|
78
113
|
export default ActivitiesStepper;
|
|
79
114
|
//# sourceMappingURL=activities-stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activities-stepper.d.ts","sourceRoot":"","sources":["../../src/steps/activities-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"activities-stepper.d.ts","sourceRoot":"","sources":["../../src/steps/activities-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAiB,SAAS,EAAE,YAAY,EAAM,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAa,MAAM,gBAAgB,CAAC;AAOxI,KAAK,qBAAqB,GAAG;IAC5B,QAAQ,EAAE,YAAY,CAAC;IACvB,iBAAiB,EAAE,YAAY,CAAC;IAChC,aAAa,EAAE,YAAY,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,aAAa,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,KAAK,uBAAuB,GAAG,aAAa,GAAG,qBAAqB,CAAC;AAErE;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,QAAS,YAAW,UAAU;IACpE,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,yBAAyB,CAA0B;IAC3D,OAAO,CAAC,sBAAsB,CAA0B;IACxD,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,YAAY,CAAwD;IAC5E,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,eAAe,CAAc;IACrC,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,gBAAgB,CAA+D;IACvF,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,yBAAyB,CAAkI;IACnK,OAAO,CAAC,eAAe,CAAS;IAEhC,MAAM,EAAE,cAAc,CAgCrB;IACD,UAAU;;;MAGT;IAED,QAAQ,CAAC,SAAS;;;;gDAIW,MAAM,QAAQ,MAAM,YAAY,QAAQ,gBAAgB,SAAS,aAAa,MAAM,EAAE,cAAc,MAAM;;;;;yCA2D3G;gBAAE,KAAK,EAAE,YAAY,EAAE,CAAA;aAAE,eAAe,YAAY;;;;;;;;;;2CA8BlD;gBAAE,OAAO,EAAE,YAAY,EAAE,CAAA;aAAE,eAAe,YAAY;;;;6DA6H/C,YAAY;;MA8BN;IAE3C,QAAQ,CAAC,UAAU;;;;gDAtPU,MAAM,QAAQ,MAAM,YAAY,QAAQ,gBAAgB,SAAS,aAAa,MAAM,EAAE,cAAc,MAAM;;;;;yCA2D3G;gBAAE,KAAK,EAAE,YAAY,EAAE,CAAA;aAAE,eAAe,YAAY;;;;;;;;;;2CA8BlD;gBAAE,OAAO,EAAE,YAAY,EAAE,CAAA;aAAE,eAAe,YAAY;;;;6DA6H/C,YAAY;;MAgCZ;IAErC,KAAK,EAAE,uBAAuB,CAAyB;IAEjD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;IAKlD;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE;IA4HpI;;;OAGG;IACH,qBAAqB,IAAI,IAAI;IAgB7B,OAAO,CAAC,qBAAqB;CAqE7B;AAED,eAAe,iBAAiB,CAAC"}
|