dialai 1.5.0 → 1.5.1
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/.claude/specs/poll-gate.md +269 -0
- package/dist/dialai/asl/choice-extractor.d.ts +60 -0
- package/dist/dialai/asl/choice-extractor.d.ts.map +1 -0
- package/dist/dialai/asl/choice-extractor.js +131 -0
- package/dist/dialai/asl/choice-extractor.js.map +1 -0
- package/dist/dialai/asl/index.d.ts +6 -0
- package/dist/dialai/asl/index.d.ts.map +1 -0
- package/dist/dialai/asl/index.js +9 -0
- package/dist/dialai/asl/index.js.map +1 -0
- package/dist/dialai/asl/interpreter.d.ts +6 -0
- package/dist/dialai/asl/interpreter.d.ts.map +1 -0
- package/dist/dialai/asl/interpreter.js +260 -0
- package/dist/dialai/asl/interpreter.js.map +1 -0
- package/dist/dialai/asl/jsonpath.d.ts +34 -0
- package/dist/dialai/asl/jsonpath.d.ts.map +1 -0
- package/dist/dialai/asl/jsonpath.js +229 -0
- package/dist/dialai/asl/jsonpath.js.map +1 -0
- package/dist/dialai/asl/types.d.ts +45 -0
- package/dist/dialai/asl/types.d.ts.map +1 -0
- package/dist/dialai/asl/types.js +2 -0
- package/dist/dialai/asl/types.js.map +1 -0
- package/dist/dialai/asl/validator.d.ts +17 -0
- package/dist/dialai/asl/validator.d.ts.map +1 -0
- package/dist/dialai/asl/validator.js +75 -0
- package/dist/dialai/asl/validator.js.map +1 -0
- package/dist/dialai/cli.js +0 -0
- package/dist/dialai/docs-loader.d.ts +6 -0
- package/dist/dialai/docs-loader.d.ts.map +1 -0
- package/dist/dialai/docs-loader.js +63 -0
- package/dist/dialai/docs-loader.js.map +1 -0
- package/dist/dialai/gate.d.ts +44 -0
- package/dist/dialai/gate.d.ts.map +1 -0
- package/dist/dialai/gate.js +169 -0
- package/dist/dialai/gate.js.map +1 -0
- package/dist/dialai/llm.d.ts.map +1 -1
- package/dist/dialai/llm.js +11 -2
- package/dist/dialai/llm.js.map +1 -1
- package/dist/dialai/mcp.js +0 -0
- package/dist/dialai/migrations/002-users-credits.d.ts +5 -0
- package/dist/dialai/migrations/002-users-credits.d.ts.map +1 -0
- package/dist/dialai/migrations/002-users-credits.js +30 -0
- package/dist/dialai/migrations/002-users-credits.js.map +1 -0
- package/dist/dialai/migrations/004-rename-round-to-evaluation.d.ts +8 -0
- package/dist/dialai/migrations/004-rename-round-to-evaluation.d.ts.map +1 -0
- package/dist/dialai/migrations/004-rename-round-to-evaluation.js +63 -0
- package/dist/dialai/migrations/004-rename-round-to-evaluation.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { extractTransitions } from "./choice-extractor.js";
|
|
2
|
+
import { applyInputPath, applyOutputPath, applyResultPath, applyParameters, applyResultSelector, getJsonPathValue, } from "./jsonpath.js";
|
|
3
|
+
/**
|
|
4
|
+
* Execute a single state in the state machine.
|
|
5
|
+
*/
|
|
6
|
+
export async function executeState(machine, stateName, context, config = {}) {
|
|
7
|
+
const state = machine.States[stateName];
|
|
8
|
+
if (!state) {
|
|
9
|
+
throw new Error(`State not found: ${stateName}`);
|
|
10
|
+
}
|
|
11
|
+
switch (state.Type) {
|
|
12
|
+
case "Pass":
|
|
13
|
+
return executePass(state, context);
|
|
14
|
+
case "Task":
|
|
15
|
+
return executeTask(state, context, config);
|
|
16
|
+
case "Choice":
|
|
17
|
+
return executeChoice(state);
|
|
18
|
+
case "Wait":
|
|
19
|
+
return executeWait(state, context, config);
|
|
20
|
+
case "Parallel":
|
|
21
|
+
return executeParallel(state, context, config);
|
|
22
|
+
case "Map":
|
|
23
|
+
return executeMap(state, context, config);
|
|
24
|
+
case "Succeed":
|
|
25
|
+
return executeSucceed(state, context);
|
|
26
|
+
case "Fail":
|
|
27
|
+
return executeFail(state);
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`Unknown state type: ${state.Type}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function executePass(state, context) {
|
|
33
|
+
let output = applyInputPath(context.input, state.InputPath);
|
|
34
|
+
// Apply Parameters if present
|
|
35
|
+
if (state.Parameters) {
|
|
36
|
+
output = applyParameters(state.Parameters, output);
|
|
37
|
+
}
|
|
38
|
+
// Apply Result if present
|
|
39
|
+
let result = state.Result !== undefined ? state.Result : output;
|
|
40
|
+
// Apply ResultPath
|
|
41
|
+
result = applyResultPath(context.input, result, state.ResultPath);
|
|
42
|
+
// Apply OutputPath
|
|
43
|
+
output = applyOutputPath(result, state.OutputPath);
|
|
44
|
+
if (state.End) {
|
|
45
|
+
return { type: "succeed", output };
|
|
46
|
+
}
|
|
47
|
+
if (state.Next) {
|
|
48
|
+
return { type: "continue", nextState: state.Next, output };
|
|
49
|
+
}
|
|
50
|
+
throw new Error("Pass state must have Next or End");
|
|
51
|
+
}
|
|
52
|
+
async function executeTask(state, context, config) {
|
|
53
|
+
if (!config.taskHandler) {
|
|
54
|
+
throw new Error("Task state requires a taskHandler in config");
|
|
55
|
+
}
|
|
56
|
+
if (!state.Resource) {
|
|
57
|
+
throw new Error("Task state requires a Resource");
|
|
58
|
+
}
|
|
59
|
+
let input = applyInputPath(context.input, state.InputPath);
|
|
60
|
+
// Apply Parameters if present
|
|
61
|
+
if (state.Parameters) {
|
|
62
|
+
input = applyParameters(state.Parameters, input);
|
|
63
|
+
}
|
|
64
|
+
// Call the task handler
|
|
65
|
+
let result = await config.taskHandler(state.Resource, input, context);
|
|
66
|
+
// Apply ResultSelector if present
|
|
67
|
+
if (state.ResultSelector) {
|
|
68
|
+
result = applyResultSelector(state.ResultSelector, result);
|
|
69
|
+
}
|
|
70
|
+
// Apply ResultPath
|
|
71
|
+
result = applyResultPath(context.input, result, state.ResultPath);
|
|
72
|
+
// Apply OutputPath
|
|
73
|
+
const output = applyOutputPath(result, state.OutputPath);
|
|
74
|
+
if (state.End) {
|
|
75
|
+
return { type: "succeed", output };
|
|
76
|
+
}
|
|
77
|
+
if (state.Next) {
|
|
78
|
+
return { type: "continue", nextState: state.Next, output };
|
|
79
|
+
}
|
|
80
|
+
throw new Error("Task state must have Next or End");
|
|
81
|
+
}
|
|
82
|
+
function executeChoice(state) {
|
|
83
|
+
// DIAL: Choice states do NOT evaluate conditions
|
|
84
|
+
// Instead, they return transitions for the deliberation cycle
|
|
85
|
+
const transitions = extractTransitions({
|
|
86
|
+
Type: "Choice",
|
|
87
|
+
Comment: state.Comment,
|
|
88
|
+
Choices: state.Choices,
|
|
89
|
+
Default: state.Default,
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
type: "choice",
|
|
93
|
+
prompt: state.Comment || "Make a decision",
|
|
94
|
+
transitions,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function executeWait(state, context, config) {
|
|
98
|
+
// Skip wait if configured
|
|
99
|
+
if (config.skipWait) {
|
|
100
|
+
if (state.End) {
|
|
101
|
+
return { type: "succeed", output: context.input };
|
|
102
|
+
}
|
|
103
|
+
if (state.Next) {
|
|
104
|
+
return { type: "continue", nextState: state.Next, output: context.input };
|
|
105
|
+
}
|
|
106
|
+
throw new Error("Wait state must have Next or End");
|
|
107
|
+
}
|
|
108
|
+
let waitUntil;
|
|
109
|
+
if (state.Seconds !== undefined) {
|
|
110
|
+
waitUntil = state.Seconds;
|
|
111
|
+
}
|
|
112
|
+
else if (state.Timestamp !== undefined) {
|
|
113
|
+
waitUntil = new Date(state.Timestamp);
|
|
114
|
+
}
|
|
115
|
+
else if (state.SecondsPath !== undefined) {
|
|
116
|
+
const seconds = getJsonPathValue(state.SecondsPath, context.input);
|
|
117
|
+
if (typeof seconds !== "number") {
|
|
118
|
+
throw new Error(`SecondsPath must resolve to a number, got: ${typeof seconds}`);
|
|
119
|
+
}
|
|
120
|
+
waitUntil = seconds;
|
|
121
|
+
}
|
|
122
|
+
else if (state.TimestampPath !== undefined) {
|
|
123
|
+
const timestamp = getJsonPathValue(state.TimestampPath, context.input);
|
|
124
|
+
if (typeof timestamp !== "string") {
|
|
125
|
+
throw new Error(`TimestampPath must resolve to a string, got: ${typeof timestamp}`);
|
|
126
|
+
}
|
|
127
|
+
waitUntil = new Date(timestamp);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
throw new Error("Wait state requires Seconds, Timestamp, SecondsPath, or TimestampPath");
|
|
131
|
+
}
|
|
132
|
+
const nextState = state.Next;
|
|
133
|
+
if (!nextState && !state.End) {
|
|
134
|
+
throw new Error("Wait state must have Next or End");
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
type: "wait",
|
|
138
|
+
nextState: nextState || "",
|
|
139
|
+
waitUntil,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
async function executeParallel(state, context, config) {
|
|
143
|
+
if (!state.Branches || !Array.isArray(state.Branches)) {
|
|
144
|
+
throw new Error("Parallel state requires Branches array");
|
|
145
|
+
}
|
|
146
|
+
const input = applyInputPath(context.input, state.InputPath);
|
|
147
|
+
// Execute all branches concurrently
|
|
148
|
+
const branchResults = await Promise.all(state.Branches.map(async (branch) => {
|
|
149
|
+
return executeBranch(branch, input, config);
|
|
150
|
+
}));
|
|
151
|
+
let result = branchResults;
|
|
152
|
+
// Apply ResultSelector if present
|
|
153
|
+
if (state.ResultSelector) {
|
|
154
|
+
result = applyResultSelector(state.ResultSelector, result);
|
|
155
|
+
}
|
|
156
|
+
// Apply ResultPath
|
|
157
|
+
result = applyResultPath(context.input, result, state.ResultPath);
|
|
158
|
+
// Apply OutputPath
|
|
159
|
+
const output = applyOutputPath(result, state.OutputPath);
|
|
160
|
+
if (state.End) {
|
|
161
|
+
return { type: "succeed", output };
|
|
162
|
+
}
|
|
163
|
+
if (state.Next) {
|
|
164
|
+
return { type: "continue", nextState: state.Next, output };
|
|
165
|
+
}
|
|
166
|
+
throw new Error("Parallel state must have Next or End");
|
|
167
|
+
}
|
|
168
|
+
async function executeMap(state, context, config) {
|
|
169
|
+
const input = applyInputPath(context.input, state.InputPath);
|
|
170
|
+
// Get items to iterate over
|
|
171
|
+
let items;
|
|
172
|
+
if (state.ItemsPath) {
|
|
173
|
+
const itemsValue = getJsonPathValue(state.ItemsPath, input);
|
|
174
|
+
if (!Array.isArray(itemsValue)) {
|
|
175
|
+
throw new Error(`ItemsPath must resolve to an array`);
|
|
176
|
+
}
|
|
177
|
+
items = itemsValue;
|
|
178
|
+
}
|
|
179
|
+
else if (Array.isArray(input)) {
|
|
180
|
+
items = input;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
throw new Error("Map state requires ItemsPath or array input");
|
|
184
|
+
}
|
|
185
|
+
// Get the iterator (inline or from ItemProcessor)
|
|
186
|
+
const iterator = state.Iterator;
|
|
187
|
+
if (!iterator) {
|
|
188
|
+
throw new Error("Map state requires Iterator");
|
|
189
|
+
}
|
|
190
|
+
// Execute iterator for each item
|
|
191
|
+
const results = await Promise.all(items.map(async (item, index) => {
|
|
192
|
+
let itemInput = item;
|
|
193
|
+
// Apply ItemSelector if present
|
|
194
|
+
if (state.ItemSelector) {
|
|
195
|
+
const itemContext = {
|
|
196
|
+
"$$": { Map: { Item: { Value: item, Index: index } } },
|
|
197
|
+
...((typeof input === "object" && input !== null) ? input : {}),
|
|
198
|
+
};
|
|
199
|
+
itemInput = applyParameters(state.ItemSelector, itemContext);
|
|
200
|
+
}
|
|
201
|
+
return executeBranch(iterator, itemInput, config);
|
|
202
|
+
}));
|
|
203
|
+
let result = results;
|
|
204
|
+
// Apply ResultSelector if present
|
|
205
|
+
if (state.ResultSelector) {
|
|
206
|
+
result = applyResultSelector(state.ResultSelector, result);
|
|
207
|
+
}
|
|
208
|
+
// Apply ResultPath
|
|
209
|
+
result = applyResultPath(context.input, result, state.ResultPath);
|
|
210
|
+
// Apply OutputPath
|
|
211
|
+
const output = applyOutputPath(result, state.OutputPath);
|
|
212
|
+
if (state.End) {
|
|
213
|
+
return { type: "succeed", output };
|
|
214
|
+
}
|
|
215
|
+
if (state.Next) {
|
|
216
|
+
return { type: "continue", nextState: state.Next, output };
|
|
217
|
+
}
|
|
218
|
+
throw new Error("Map state must have Next or End");
|
|
219
|
+
}
|
|
220
|
+
function executeSucceed(state, context) {
|
|
221
|
+
const output = state.Output !== undefined ? state.Output : context.input;
|
|
222
|
+
return { type: "succeed", output };
|
|
223
|
+
}
|
|
224
|
+
function executeFail(state) {
|
|
225
|
+
return {
|
|
226
|
+
type: "fail",
|
|
227
|
+
error: state.Error || "States.TaskFailed",
|
|
228
|
+
cause: state.Cause,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Execute a branch (sub-state-machine) to completion.
|
|
233
|
+
*/
|
|
234
|
+
async function executeBranch(branch, input, config) {
|
|
235
|
+
let currentState = branch.StartAt;
|
|
236
|
+
let currentInput = input;
|
|
237
|
+
const context = { input: currentInput, variables: {} };
|
|
238
|
+
for (;;) {
|
|
239
|
+
context.input = currentInput;
|
|
240
|
+
const result = await executeState(branch, currentState, context, config);
|
|
241
|
+
switch (result.type) {
|
|
242
|
+
case "succeed":
|
|
243
|
+
return result.output;
|
|
244
|
+
case "fail":
|
|
245
|
+
throw new Error(`Branch failed: ${result.error} - ${result.cause}`);
|
|
246
|
+
case "continue":
|
|
247
|
+
currentState = result.nextState;
|
|
248
|
+
currentInput = result.output;
|
|
249
|
+
break;
|
|
250
|
+
case "wait":
|
|
251
|
+
// For simplicity, wait states in branches just continue
|
|
252
|
+
currentState = result.nextState;
|
|
253
|
+
break;
|
|
254
|
+
case "choice":
|
|
255
|
+
// Choice in a branch would need special handling
|
|
256
|
+
throw new Error("Choice states in branches not supported");
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=interpreter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpreter.js","sourceRoot":"","sources":["../../../src/dialai/asl/interpreter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,cAAc,EACd,eAAe,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,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,SAAS;gBACZ,OAAO,MAAM,CAAC,MAAM,CAAC;YACvB,KAAK,MAAM;gBACT,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACtE,KAAK,UAAU;gBACb,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;gBAChC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;gBAC7B,MAAM;YACR,KAAK,MAAM;gBACT,wDAAwD;gBACxD,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;gBAChC,MAAM;YACR,KAAK,QAAQ;gBACX,iDAAiD;gBACjD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple JSONPath utilities for ASL input/output processing.
|
|
3
|
+
* Supports basic paths: $, $.field, $.nested.field, $.array[0]
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get a value from an object using JSONPath.
|
|
7
|
+
* Supports both $ (input) and $$ (context) paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getJsonPathValue(path: string, input: unknown): unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Set a value in an object using JSONPath, creating nested structure as needed.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setJsonPathValue(path: string, input: unknown, value: unknown): unknown;
|
|
14
|
+
/**
|
|
15
|
+
* Apply InputPath to select a subset of input.
|
|
16
|
+
*/
|
|
17
|
+
export declare function applyInputPath(input: unknown, inputPath?: string | null): unknown;
|
|
18
|
+
/**
|
|
19
|
+
* Apply OutputPath to select a subset of output.
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyOutputPath(output: unknown, outputPath?: string | null): unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Apply ResultPath to place result into original input.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyResultPath(originalInput: unknown, result: unknown, resultPath?: string | null): unknown;
|
|
26
|
+
/**
|
|
27
|
+
* Apply Parameters transformation using JSONPath references.
|
|
28
|
+
*/
|
|
29
|
+
export declare function applyParameters(parameters: Record<string, unknown>, input: unknown): unknown;
|
|
30
|
+
/**
|
|
31
|
+
* Apply ResultSelector transformation.
|
|
32
|
+
*/
|
|
33
|
+
export declare function applyResultSelector(resultSelector: Record<string, unknown>, result: unknown): unknown;
|
|
34
|
+
//# sourceMappingURL=jsonpath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonpath.d.ts","sourceRoot":"","sources":["../../../src/dialai/asl/jsonpath.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CA8DtE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,GACb,OAAO,CAoDT;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAST;AA6CD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,KAAK,EAAE,OAAO,GACb,OAAO,CAET;AAgCD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,MAAM,EAAE,OAAO,GACd,OAAO,CAET"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple JSONPath utilities for ASL input/output processing.
|
|
3
|
+
* Supports basic paths: $, $.field, $.nested.field, $.array[0]
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get a value from an object using JSONPath.
|
|
7
|
+
* Supports both $ (input) and $$ (context) paths.
|
|
8
|
+
*/
|
|
9
|
+
export function getJsonPathValue(path, input) {
|
|
10
|
+
if (path === "$") {
|
|
11
|
+
return input;
|
|
12
|
+
}
|
|
13
|
+
// Handle $$ context paths (e.g., $$.Map.Item.Value)
|
|
14
|
+
// The $$ refers to the context object at the $$ key of input
|
|
15
|
+
if (path.startsWith("$$.")) {
|
|
16
|
+
const parts = parsePath(path.slice(3));
|
|
17
|
+
// First, get the $$ context object from input
|
|
18
|
+
let current = input && typeof input === "object"
|
|
19
|
+
? input["$$"]
|
|
20
|
+
: undefined;
|
|
21
|
+
for (const part of parts) {
|
|
22
|
+
if (current === null || current === undefined) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
if (typeof part === "number") {
|
|
26
|
+
if (!Array.isArray(current)) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
current = current[part];
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (typeof current !== "object") {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
current = current[part];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return current;
|
|
39
|
+
}
|
|
40
|
+
if (!path.startsWith("$.")) {
|
|
41
|
+
throw new Error(`Invalid JSONPath: ${path}`);
|
|
42
|
+
}
|
|
43
|
+
const parts = parsePath(path.slice(2));
|
|
44
|
+
let current = input;
|
|
45
|
+
for (const part of parts) {
|
|
46
|
+
if (current === null || current === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
if (typeof part === "number") {
|
|
50
|
+
if (!Array.isArray(current)) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
current = current[part];
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (typeof current !== "object") {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
current = current[part];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return current;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Set a value in an object using JSONPath, creating nested structure as needed.
|
|
66
|
+
*/
|
|
67
|
+
export function setJsonPathValue(path, input, value) {
|
|
68
|
+
if (path === "$") {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
if (!path.startsWith("$.")) {
|
|
72
|
+
throw new Error(`Invalid JSONPath: ${path}`);
|
|
73
|
+
}
|
|
74
|
+
// Clone the input to avoid mutation
|
|
75
|
+
const result = input === null || input === undefined
|
|
76
|
+
? {}
|
|
77
|
+
: JSON.parse(JSON.stringify(input));
|
|
78
|
+
const parts = parsePath(path.slice(2));
|
|
79
|
+
let current = result;
|
|
80
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
81
|
+
const part = parts[i];
|
|
82
|
+
const nextPart = parts[i + 1];
|
|
83
|
+
if (typeof part === "number") {
|
|
84
|
+
if (!Array.isArray(current)) {
|
|
85
|
+
throw new Error(`Expected array at index ${part}`);
|
|
86
|
+
}
|
|
87
|
+
if (current[part] === undefined) {
|
|
88
|
+
current[part] = typeof nextPart === "number" ? [] : {};
|
|
89
|
+
}
|
|
90
|
+
current = current[part];
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const obj = current;
|
|
94
|
+
if (obj[part] === undefined || obj[part] === null) {
|
|
95
|
+
obj[part] = typeof nextPart === "number" ? [] : {};
|
|
96
|
+
}
|
|
97
|
+
current = obj[part];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const lastPart = parts[parts.length - 1];
|
|
101
|
+
if (typeof lastPart === "number") {
|
|
102
|
+
if (!Array.isArray(current)) {
|
|
103
|
+
throw new Error(`Expected array at index ${lastPart}`);
|
|
104
|
+
}
|
|
105
|
+
current[lastPart] = value;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
current[lastPart] = value;
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Apply InputPath to select a subset of input.
|
|
114
|
+
*/
|
|
115
|
+
export function applyInputPath(input, inputPath) {
|
|
116
|
+
if (inputPath === null) {
|
|
117
|
+
return {};
|
|
118
|
+
}
|
|
119
|
+
if (inputPath === undefined || inputPath === "$") {
|
|
120
|
+
return input;
|
|
121
|
+
}
|
|
122
|
+
return getJsonPathValue(inputPath, input);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Apply OutputPath to select a subset of output.
|
|
126
|
+
*/
|
|
127
|
+
export function applyOutputPath(output, outputPath) {
|
|
128
|
+
if (outputPath === null) {
|
|
129
|
+
return {};
|
|
130
|
+
}
|
|
131
|
+
if (outputPath === undefined || outputPath === "$") {
|
|
132
|
+
return output;
|
|
133
|
+
}
|
|
134
|
+
return getJsonPathValue(outputPath, output);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Apply ResultPath to place result into original input.
|
|
138
|
+
*/
|
|
139
|
+
export function applyResultPath(originalInput, result, resultPath) {
|
|
140
|
+
if (resultPath === null) {
|
|
141
|
+
// Discard result, keep original input
|
|
142
|
+
return originalInput;
|
|
143
|
+
}
|
|
144
|
+
if (resultPath === undefined || resultPath === "$") {
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
return setJsonPathValue(resultPath, originalInput, result);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Parse a JSONPath segment into field names and array indices.
|
|
151
|
+
*/
|
|
152
|
+
function parsePath(path) {
|
|
153
|
+
const parts = [];
|
|
154
|
+
let current = "";
|
|
155
|
+
let i = 0;
|
|
156
|
+
while (i < path.length) {
|
|
157
|
+
const char = path[i];
|
|
158
|
+
if (char === ".") {
|
|
159
|
+
if (current) {
|
|
160
|
+
parts.push(current);
|
|
161
|
+
current = "";
|
|
162
|
+
}
|
|
163
|
+
i++;
|
|
164
|
+
}
|
|
165
|
+
else if (char === "[") {
|
|
166
|
+
if (current) {
|
|
167
|
+
parts.push(current);
|
|
168
|
+
current = "";
|
|
169
|
+
}
|
|
170
|
+
i++;
|
|
171
|
+
let indexStr = "";
|
|
172
|
+
while (i < path.length && path[i] !== "]") {
|
|
173
|
+
indexStr += path[i];
|
|
174
|
+
i++;
|
|
175
|
+
}
|
|
176
|
+
i++; // skip ]
|
|
177
|
+
parts.push(parseInt(indexStr, 10));
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
current += char;
|
|
181
|
+
i++;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (current) {
|
|
185
|
+
parts.push(current);
|
|
186
|
+
}
|
|
187
|
+
return parts;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Apply Parameters transformation using JSONPath references.
|
|
191
|
+
*/
|
|
192
|
+
export function applyParameters(parameters, input) {
|
|
193
|
+
return transformObject(parameters, input);
|
|
194
|
+
}
|
|
195
|
+
function transformObject(obj, input) {
|
|
196
|
+
if (obj === null || obj === undefined) {
|
|
197
|
+
return obj;
|
|
198
|
+
}
|
|
199
|
+
if (Array.isArray(obj)) {
|
|
200
|
+
return obj.map((item) => transformObject(item, input));
|
|
201
|
+
}
|
|
202
|
+
if (typeof obj === "object") {
|
|
203
|
+
const result = {};
|
|
204
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
205
|
+
if (key.endsWith(".$")) {
|
|
206
|
+
// JSONPath reference
|
|
207
|
+
const newKey = key.slice(0, -2);
|
|
208
|
+
if (typeof value === "string") {
|
|
209
|
+
result[newKey] = getJsonPathValue(value, input);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
result[newKey] = value;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
result[key] = transformObject(value, input);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return result;
|
|
220
|
+
}
|
|
221
|
+
return obj;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Apply ResultSelector transformation.
|
|
225
|
+
*/
|
|
226
|
+
export function applyResultSelector(resultSelector, result) {
|
|
227
|
+
return transformObject(resultSelector, result);
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=jsonpath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonpath.js","sourceRoot":"","sources":["../../../src/dialai/asl/jsonpath.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,KAAc;IAC3D,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oDAAoD;IACpD,6DAA6D;IAC7D,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,8CAA8C;QAC9C,IAAI,OAAO,GACT,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAChC,CAAC,CAAE,KAAiC,CAAC,IAAI,CAAC;YAC1C,CAAC,CAAC,SAAS,CAAC;QAEhB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC9C,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7B,IAAI,CAAC,K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B;gBACrB,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBAC9B,MAAM,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAClD,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;gBACzB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,cAAuC,EACvC,MAAe;IAEf,OAAO,eAAe,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { StateMachine } from "asl-types";
|
|
2
|
+
export interface DIALStateMachine extends StateMachine {
|
|
3
|
+
Name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ChoiceCondition {
|
|
6
|
+
variable?: string;
|
|
7
|
+
operator: string;
|
|
8
|
+
value?: unknown;
|
|
9
|
+
children?: ChoiceCondition[];
|
|
10
|
+
}
|
|
11
|
+
export interface TransitionOption {
|
|
12
|
+
name: string;
|
|
13
|
+
targetState: string;
|
|
14
|
+
condition: ChoiceCondition;
|
|
15
|
+
}
|
|
16
|
+
export type StateResult = {
|
|
17
|
+
type: "continue";
|
|
18
|
+
nextState: string;
|
|
19
|
+
output: unknown;
|
|
20
|
+
} | {
|
|
21
|
+
type: "wait";
|
|
22
|
+
nextState: string;
|
|
23
|
+
waitUntil: Date | number;
|
|
24
|
+
} | {
|
|
25
|
+
type: "choice";
|
|
26
|
+
prompt: string;
|
|
27
|
+
transitions: TransitionOption[];
|
|
28
|
+
} | {
|
|
29
|
+
type: "succeed";
|
|
30
|
+
output: unknown;
|
|
31
|
+
} | {
|
|
32
|
+
type: "fail";
|
|
33
|
+
error: string;
|
|
34
|
+
cause?: string;
|
|
35
|
+
};
|
|
36
|
+
export type TaskHandler = (resource: string, input: unknown, context: ExecutionContext) => Promise<unknown>;
|
|
37
|
+
export interface InterpreterConfig {
|
|
38
|
+
taskHandler?: TaskHandler;
|
|
39
|
+
skipWait?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ExecutionContext {
|
|
42
|
+
input: unknown;
|
|
43
|
+
variables: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dialai/asl/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B;AAGD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,eAAe,CAAC;CAC5B;AAGD,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,GAC7D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,gBAAgB,EAAE,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAGpD,MAAM,MAAM,WAAW,GAAG,CACxB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,OAAO,CAAC,CAAC;AAGtB,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dialai/asl/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DIALStateMachine } from "./types.js";
|
|
2
|
+
export interface ValidationResult {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
errors: string[];
|
|
5
|
+
warnings: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Validate a DIAL state machine definition.
|
|
9
|
+
* Wraps asl-validator and adds DIAL-specific checks.
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateDIALStateMachine(machine: unknown): ValidationResult;
|
|
12
|
+
/**
|
|
13
|
+
* Validate and cast to DIALStateMachine.
|
|
14
|
+
* Throws if invalid.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseDIALStateMachine(machine: unknown): DIALStateMachine;
|
|
17
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/dialai/asl/validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,GACf,gBAAgB,CAsDlB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAMxE"}
|