shiplightai 0.1.95 → 0.1.97
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/CHANGELOG.md +55 -0
- package/dist/cjs/debugger-manager.cjs +8 -8
- package/dist/cjs/debugger-pw.cjs +93 -71
- package/dist/cjs/fixture.cjs +106 -80
- package/dist/cjs/index.cjs +117 -91
- package/dist/cjs/reporter.cjs +46 -46
- package/dist/cli.js +123 -122
- package/dist/debugger-manager.js +10 -10
- package/dist/debugger-pw.d.ts +1 -1
- package/dist/debugger-pw.js +93 -71
- package/dist/fixture.d.ts +52 -10
- package/dist/fixture.js +106 -80
- package/dist/index.js +117 -91
- package/dist/reporter.d.ts +8 -0
- package/dist/reporter.js +46 -46
- package/dist/spec/actions.md +14 -14
- package/dist/spec/yaml.md +2 -1
- package/dist/static-embedded/assets/{index-BYdMLaec.js → index-DVb6b-JE.js} +159 -76
- package/dist/static-embedded/assets/{index-Y4Ey4kC-.js → index-eFclB13U.js} +2 -2
- package/dist/static-embedded/index.html +1 -1
- package/package.json +10 -12
package/dist/spec/actions.md
CHANGED
|
@@ -24,7 +24,7 @@ resulting step runs with no target).
|
|
|
24
24
|
|
|
25
25
|
28 actions.
|
|
26
26
|
|
|
27
|
-
> Engine actions with no YAML form (agent-only): `
|
|
27
|
+
> Engine actions with no YAML form (agent-only): `perform_accurate_operation`.
|
|
28
28
|
|
|
29
29
|
## ai_extract
|
|
30
30
|
|
|
@@ -67,7 +67,7 @@ Wait until a specific condition is met on the page (e.g., "page loads", "spinner
|
|
|
67
67
|
"timeout_seconds": {
|
|
68
68
|
"type": "number",
|
|
69
69
|
"exclusiveMinimum": 0,
|
|
70
|
-
"description": "Timeout in seconds
|
|
70
|
+
"description": "Timeout in seconds. Set this only when the instruction states a timeout; otherwise leave it unset so the 60s default applies."
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"required": [
|
|
@@ -90,7 +90,7 @@ Clear the contents of an input field, textarea, or other editable element.
|
|
|
90
90
|
"properties": {
|
|
91
91
|
"timeout_ms": {
|
|
92
92
|
"type": "number",
|
|
93
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
93
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"additionalProperties": false,
|
|
@@ -110,7 +110,7 @@ Click an interactive element.
|
|
|
110
110
|
"properties": {
|
|
111
111
|
"timeout_ms": {
|
|
112
112
|
"type": "number",
|
|
113
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
113
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"additionalProperties": false,
|
|
@@ -175,7 +175,7 @@ Double-click an interactive element.
|
|
|
175
175
|
"properties": {
|
|
176
176
|
"timeout_ms": {
|
|
177
177
|
"type": "number",
|
|
178
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
178
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
"additionalProperties": false,
|
|
@@ -306,7 +306,7 @@ Navigate to a specific URL. Use this to visit web pages. Set new_tab=true to ope
|
|
|
306
306
|
"timeout_seconds": {
|
|
307
307
|
"type": "number",
|
|
308
308
|
"exclusiveMinimum": 0,
|
|
309
|
-
"description": "Navigation timeout in seconds.
|
|
309
|
+
"description": "Navigation timeout in seconds. Set this only when the instruction states a timeout; otherwise leave it unset so the 20s default applies."
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
"required": [
|
|
@@ -329,7 +329,7 @@ Hover over an interactive element.
|
|
|
329
329
|
"properties": {
|
|
330
330
|
"timeout_ms": {
|
|
331
331
|
"type": "number",
|
|
332
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
332
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
335
|
"additionalProperties": false,
|
|
@@ -353,7 +353,7 @@ Type text into an input field. To replace existing content, use clear_input firs
|
|
|
353
353
|
},
|
|
354
354
|
"timeout_ms": {
|
|
355
355
|
"type": "number",
|
|
356
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
356
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
357
357
|
}
|
|
358
358
|
},
|
|
359
359
|
"required": [
|
|
@@ -410,7 +410,7 @@ Right-click an interactive element.
|
|
|
410
410
|
"properties": {
|
|
411
411
|
"timeout_ms": {
|
|
412
412
|
"type": "number",
|
|
413
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
413
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
414
414
|
}
|
|
415
415
|
},
|
|
416
416
|
"additionalProperties": false,
|
|
@@ -491,7 +491,7 @@ Scroll on a scrollable element horizontally and vertically.
|
|
|
491
491
|
},
|
|
492
492
|
"timeout_ms": {
|
|
493
493
|
"type": "number",
|
|
494
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
494
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
495
495
|
}
|
|
496
496
|
},
|
|
497
497
|
"additionalProperties": false,
|
|
@@ -536,7 +536,7 @@ Select an option from a dropdown/select element by value, label, or index.
|
|
|
536
536
|
},
|
|
537
537
|
"timeout_ms": {
|
|
538
538
|
"type": "number",
|
|
539
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
539
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
540
540
|
}
|
|
541
541
|
},
|
|
542
542
|
"required": [
|
|
@@ -569,7 +569,7 @@ The date must be in YYYY-MM-DD format (e.g., 2024-03-15).
|
|
|
569
569
|
},
|
|
570
570
|
"timeout_ms": {
|
|
571
571
|
"type": "number",
|
|
572
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
572
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
573
573
|
}
|
|
574
574
|
},
|
|
575
575
|
"required": [
|
|
@@ -628,7 +628,7 @@ Click on target element (usually contains hints like "Upload file" or "Choose fi
|
|
|
628
628
|
},
|
|
629
629
|
"timeout_ms": {
|
|
630
630
|
"type": "number",
|
|
631
|
-
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
631
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout. Set this only when the instruction states a timeout; otherwise leave it unset so the configured default applies."
|
|
632
632
|
}
|
|
633
633
|
},
|
|
634
634
|
"required": [
|
|
@@ -693,7 +693,7 @@ Wait for an in-progress download to complete.
|
|
|
693
693
|
"timeout_seconds": {
|
|
694
694
|
"type": "number",
|
|
695
695
|
"exclusiveMinimum": 0,
|
|
696
|
-
"description": "Maximum time in seconds to wait for download to complete
|
|
696
|
+
"description": "Maximum time in seconds to wait for download to complete. Set this only when the instruction states a timeout; otherwise leave it unset so the 10s default applies."
|
|
697
697
|
}
|
|
698
698
|
},
|
|
699
699
|
"additionalProperties": false,
|
package/dist/spec/yaml.md
CHANGED
|
@@ -82,7 +82,7 @@ A file must be either a **single-test file** (with `goal`/`statements`) or a **s
|
|
|
82
82
|
|
|
83
83
|
| Key | Type | Default | Description |
|
|
84
84
|
|---|---|---|---|
|
|
85
|
-
| `base_url` | `string` | — | Base URL for relative `URL:` statements. Maps to Playwright `test.use({ baseURL })`. Does **not** auto-navigate — use `URL: /` to navigate. |
|
|
85
|
+
| `base_url` | `string` | — | Base URL for relative `URL:` statements. Maps to Playwright `test.use({ baseURL })`. Applies to single-test **and** suite files. Does **not** auto-navigate — use `URL: /` to navigate. Absolute `URL:` values (`https://…`, `chrome-extension://…`) need no `base_url`. Takes precedence over `use.baseURL`. |
|
|
86
86
|
| `test_case_id` | `number` | — | Links to a cloud test case for sync. |
|
|
87
87
|
| `name` | `string` | — | Test title override (single-test) or suite name (suite). If set on a single-test file without `goal`, `goal` is auto-derived from `name`. |
|
|
88
88
|
| `tags` | `string[]` | — | Playwright tags for `--grep` filtering. Each tag is prefixed with `@` in the test name. |
|
|
@@ -721,6 +721,7 @@ suite:
|
|
|
721
721
|
| Key | Type | Required | Description |
|
|
722
722
|
|---|---|---|---|
|
|
723
723
|
| `tests` | `SuiteTest[]` | Yes | Array of test definitions (at least one). |
|
|
724
|
+
| `base_url` | `string` | No | Alias for the top-level [`base_url`](#optional-keys), written inside `suite:`. Both spellings map to `test.use({ baseURL })`; this one wins if both are present. Prefer the top-level form — the debugger emits this one on save. |
|
|
724
725
|
| `beforeAll` | `Statement[]` | No | Runs once before all tests. See [Lifecycle Hooks](#10-lifecycle-hooks). |
|
|
725
726
|
| `afterAll` | `Statement[]` | No | Runs once after all tests. |
|
|
726
727
|
| `beforeEach` | `Statement[]` | No | Runs before each test. |
|
|
@@ -30381,12 +30381,11 @@ const isDynamicAction = (actionName) => {
|
|
|
30381
30381
|
"assert",
|
|
30382
30382
|
"verify",
|
|
30383
30383
|
"wait_for_download_complete",
|
|
30384
|
-
"extract_activation_code",
|
|
30385
30384
|
"extract_email_content"
|
|
30386
30385
|
].includes(actionName);
|
|
30387
30386
|
};
|
|
30388
30387
|
const allowPureVisionAction = (actionName) => {
|
|
30389
|
-
const blockList = ["js_code", "function", "assert", "ai_assert", "verify", "ai_extract", "ai_wait_until", "upload_file", "login", "
|
|
30388
|
+
const blockList = ["js_code", "function", "assert", "ai_assert", "verify", "ai_extract", "ai_wait_until", "upload_file", "login", "extract_email_content", "ai_step"];
|
|
30390
30389
|
return !blockList.includes(actionName);
|
|
30391
30390
|
};
|
|
30392
30391
|
let getRandomValues$1;
|
|
@@ -40498,7 +40497,7 @@ const YAML_STRINGIFY_OPTIONS = {
|
|
|
40498
40497
|
defaultStringType: "PLAIN"
|
|
40499
40498
|
};
|
|
40500
40499
|
function actionToYaml(action) {
|
|
40501
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
40500
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
40502
40501
|
const actionName = ((_b = (_a = action.action_entity) == null ? void 0 : _a.action_data) == null ? void 0 : _b.action_name) ?? ((_d = (_c = action.action_entity) == null ? void 0 : _c.action) == null ? void 0 : _d.action_name);
|
|
40503
40502
|
const kwargs = ((_f = (_e = action.action_entity) == null ? void 0 : _e.action_data) == null ? void 0 : _f.kwargs) ?? ((_h = (_g = action.action_entity) == null ? void 0 : _g.action) == null ? void 0 : _h.kwargs);
|
|
40504
40503
|
if (actionName === "verify") {
|
|
@@ -40564,6 +40563,16 @@ function actionToYaml(action) {
|
|
|
40564
40563
|
if (!actionData) {
|
|
40565
40564
|
return { intent: action.description };
|
|
40566
40565
|
}
|
|
40566
|
+
if (actionData.action_name === "function" && typeof ((_o = actionData.kwargs) == null ? void 0 : _o.functionName) === "string" && actionData.kwargs.functionName.includes("#") && !Array.isArray(actionData.kwargs.parameterNames) && !Array.isArray(actionData.kwargs.parameterValues) && (!Array.isArray(actionData.args) || actionData.args.length === 0)) {
|
|
40567
|
+
const result2 = {
|
|
40568
|
+
intent: action.description,
|
|
40569
|
+
call: actionData.kwargs.functionName
|
|
40570
|
+
};
|
|
40571
|
+
if (Array.isArray(actionData.kwargs.args) && actionData.kwargs.args.length > 0) {
|
|
40572
|
+
result2.args = actionData.kwargs.args;
|
|
40573
|
+
}
|
|
40574
|
+
return result2;
|
|
40575
|
+
}
|
|
40567
40576
|
const result = {
|
|
40568
40577
|
intent: action.description,
|
|
40569
40578
|
action: actionData.action_name
|
|
@@ -188535,6 +188544,64 @@ const detectAIMode = (content2) => {
|
|
|
188535
188544
|
const isAIActionType = (actionName) => {
|
|
188536
188545
|
return actionName === "ai_action" || actionName === "ai_step";
|
|
188537
188546
|
};
|
|
188547
|
+
function parseParameterNames(functionCode) {
|
|
188548
|
+
if (!functionCode) return [];
|
|
188549
|
+
const match = functionCode.match(/(?:async\s+)?function\s+\w+\s*\(([^)]*)\)/) ?? functionCode.match(/(?:async\s*)?\(([^)]*)\)\s*=>/);
|
|
188550
|
+
if (!(match == null ? void 0 : match[1].trim())) return [];
|
|
188551
|
+
return match[1].split(",").map((parameter) => parameter.split(":")[0].trim().replace(/\?$/, "")).filter(Boolean);
|
|
188552
|
+
}
|
|
188553
|
+
function preserveArgumentType(value2, originalValue) {
|
|
188554
|
+
if (typeof originalValue === "number" && value2.trim() !== "") {
|
|
188555
|
+
const numericValue = Number(value2);
|
|
188556
|
+
if (Number.isFinite(numericValue)) return numericValue;
|
|
188557
|
+
}
|
|
188558
|
+
if (typeof originalValue === "boolean") {
|
|
188559
|
+
if (value2 === "true") return true;
|
|
188560
|
+
if (value2 === "false") return false;
|
|
188561
|
+
}
|
|
188562
|
+
return value2;
|
|
188563
|
+
}
|
|
188564
|
+
function findFunctionDefinition(functions, functionName, functionId) {
|
|
188565
|
+
return functions == null ? void 0 : functions.find(
|
|
188566
|
+
(func) => func.name === functionName || functionId !== void 0 && String(func.id) === String(functionId)
|
|
188567
|
+
);
|
|
188568
|
+
}
|
|
188569
|
+
function mapFunctionArgumentsForDisplay(argumentValues, functionCode, legacyParameterNames = []) {
|
|
188570
|
+
const parameterNames = legacyParameterNames.length > 0 ? [...legacyParameterNames] : parseParameterNames(functionCode);
|
|
188571
|
+
return Object.fromEntries(argumentValues.map((value2, index2) => [
|
|
188572
|
+
parameterNames[index2] || `arg${index2 + 1}`,
|
|
188573
|
+
value2 === null || value2 === void 0 ? "" : String(value2)
|
|
188574
|
+
]));
|
|
188575
|
+
}
|
|
188576
|
+
function updateFunctionActionData(actionData, func, paramValues = {}) {
|
|
188577
|
+
const values2 = Object.values(paramValues);
|
|
188578
|
+
const currentKwargs = actionData.kwargs ?? {};
|
|
188579
|
+
if (Array.isArray(currentKwargs.args)) {
|
|
188580
|
+
const positionalValues = values2.map(
|
|
188581
|
+
(value2, index2) => preserveArgumentType(value2, currentKwargs.args[index2])
|
|
188582
|
+
);
|
|
188583
|
+
const nextKwargs = {
|
|
188584
|
+
...currentKwargs,
|
|
188585
|
+
functionName: func.name,
|
|
188586
|
+
functionId: func.id,
|
|
188587
|
+
args: positionalValues
|
|
188588
|
+
};
|
|
188589
|
+
delete nextKwargs.parameterNames;
|
|
188590
|
+
delete nextKwargs.parameterValues;
|
|
188591
|
+
return { ...actionData, kwargs: nextKwargs };
|
|
188592
|
+
}
|
|
188593
|
+
return {
|
|
188594
|
+
...actionData,
|
|
188595
|
+
...Array.isArray(actionData.args) ? { args: values2 } : {},
|
|
188596
|
+
kwargs: {
|
|
188597
|
+
...currentKwargs,
|
|
188598
|
+
functionName: func.name,
|
|
188599
|
+
functionId: func.id,
|
|
188600
|
+
parameterNames: Object.keys(paramValues),
|
|
188601
|
+
parameterValues: values2
|
|
188602
|
+
}
|
|
188603
|
+
};
|
|
188604
|
+
}
|
|
188538
188605
|
const shouldDisableStatement = (debugContext, debugStatus) => {
|
|
188539
188606
|
if (!debugContext || !debugContext.isDebugging) {
|
|
188540
188607
|
return false;
|
|
@@ -188738,7 +188805,7 @@ function dynamic(importFn, _options) {
|
|
|
188738
188805
|
);
|
|
188739
188806
|
return Wrapper;
|
|
188740
188807
|
}
|
|
188741
|
-
const MonacoEditor = dynamic(() => __vitePreload(() => import("./index-
|
|
188808
|
+
const MonacoEditor = dynamic(() => __vitePreload(() => import("./index-eFclB13U.js"), true ? [] : void 0), {});
|
|
188742
188809
|
const CodeEditor = ({
|
|
188743
188810
|
initialCode = "",
|
|
188744
188811
|
onConfirm,
|
|
@@ -189156,6 +189223,8 @@ const FunctionEditor = ({
|
|
|
189156
189223
|
functionName,
|
|
189157
189224
|
functionId,
|
|
189158
189225
|
parameters = {},
|
|
189226
|
+
argumentValues = [],
|
|
189227
|
+
parameterNames = [],
|
|
189159
189228
|
onFunctionSelect,
|
|
189160
189229
|
onFunctionCancel,
|
|
189161
189230
|
placeholder = "Click to configure function...",
|
|
@@ -189172,6 +189241,12 @@ const FunctionEditor = ({
|
|
|
189172
189241
|
}
|
|
189173
189242
|
const [functionModalOpen, setFunctionModalOpen] = reactExports.useState(false);
|
|
189174
189243
|
const { functions } = useFunctions();
|
|
189244
|
+
const selectedFunction = findFunctionDefinition(
|
|
189245
|
+
functions,
|
|
189246
|
+
functionName,
|
|
189247
|
+
functionId
|
|
189248
|
+
);
|
|
189249
|
+
const displayedParameters = Object.keys(parameters).length > 0 ? parameters : mapFunctionArgumentsForDisplay(argumentValues, selectedFunction == null ? void 0 : selectedFunction.code, parameterNames);
|
|
189175
189250
|
const [editingParamIndex, setEditingParamIndex] = reactExports.useState(null);
|
|
189176
189251
|
We.useEffect(() => {
|
|
189177
189252
|
if (!readOnly && isNewlyCreated && !functionName) {
|
|
@@ -189200,25 +189275,18 @@ const FunctionEditor = ({
|
|
|
189200
189275
|
}
|
|
189201
189276
|
};
|
|
189202
189277
|
const handleParameterValueChange = (index2, value2) => {
|
|
189203
|
-
if (onFunctionSelect &&
|
|
189204
|
-
const
|
|
189205
|
-
|
|
189206
|
-
|
|
189207
|
-
|
|
189208
|
-
|
|
189209
|
-
|
|
189210
|
-
updatedParams[param.name] = value2;
|
|
189211
|
-
} else {
|
|
189212
|
-
updatedParams[param.name] = param.value;
|
|
189213
|
-
}
|
|
189214
|
-
});
|
|
189215
|
-
onFunctionSelect(func, updatedParams);
|
|
189216
|
-
}
|
|
189278
|
+
if (onFunctionSelect && selectedFunction) {
|
|
189279
|
+
const customParams = getCustomParameters();
|
|
189280
|
+
const updatedParams = { ...displayedParameters };
|
|
189281
|
+
customParams.forEach((param, paramIndex) => {
|
|
189282
|
+
updatedParams[param.name] = paramIndex === index2 ? value2 : param.value;
|
|
189283
|
+
});
|
|
189284
|
+
onFunctionSelect(selectedFunction, updatedParams);
|
|
189217
189285
|
}
|
|
189218
189286
|
setEditingParamIndex(null);
|
|
189219
189287
|
};
|
|
189220
189288
|
const getCustomParameters = () => {
|
|
189221
|
-
return Object.entries(
|
|
189289
|
+
return Object.entries(displayedParameters).map(([name2, value2]) => ({
|
|
189222
189290
|
name: name2,
|
|
189223
189291
|
value: value2 || ""
|
|
189224
189292
|
})).filter((param) => !isSystemParameter(param.name));
|
|
@@ -190971,7 +191039,7 @@ const ActionEditor = ({
|
|
|
190971
191039
|
enabled,
|
|
190972
191040
|
isNewlyCreated
|
|
190973
191041
|
}) => {
|
|
190974
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
191042
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
190975
191043
|
const t2 = n("TestCases");
|
|
190976
191044
|
const { defaultEnvironmentId } = useEditor();
|
|
190977
191045
|
const currentActionType = getActionTypeFromActionName(actionName);
|
|
@@ -191012,24 +191080,37 @@ const ActionEditor = ({
|
|
|
191012
191080
|
};
|
|
191013
191081
|
if (isCodeAction) {
|
|
191014
191082
|
const existingCode = ((_b = (_a = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _a.kwargs) == null ? void 0 : _b.code) || "";
|
|
191015
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
191016
|
-
|
|
191017
|
-
|
|
191018
|
-
|
|
191019
|
-
|
|
191020
|
-
|
|
191021
|
-
|
|
191022
|
-
|
|
191023
|
-
|
|
191083
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
191084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191085
|
+
BasicActionEditor,
|
|
191086
|
+
{
|
|
191087
|
+
description,
|
|
191088
|
+
onDescriptionChange: handleDescriptionChange,
|
|
191089
|
+
placeholder: getPlaceholder(),
|
|
191090
|
+
emptyText: getEmptyText(),
|
|
191091
|
+
enabled
|
|
191092
|
+
}
|
|
191093
|
+
),
|
|
191094
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191095
|
+
CodeEditor,
|
|
191096
|
+
{
|
|
191097
|
+
initialCode: existingCode,
|
|
191098
|
+
onConfirm: onCodeConfirm,
|
|
191099
|
+
onCancel: onCodeCancel,
|
|
191100
|
+
readOnly: !enabled
|
|
191101
|
+
}
|
|
191102
|
+
)
|
|
191103
|
+
] });
|
|
191024
191104
|
}
|
|
191025
191105
|
if (isFunctionAction) {
|
|
191026
191106
|
const functionName = (_d = (_c = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _c.kwargs) == null ? void 0 : _d.functionName;
|
|
191027
191107
|
const functionId = (_f = (_e = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _e.kwargs) == null ? void 0 : _f.functionId;
|
|
191028
191108
|
const parameters = {};
|
|
191029
191109
|
const parameterNames = ((_h = (_g = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.parameterNames) || [];
|
|
191030
|
-
const
|
|
191110
|
+
const argumentValues = ((_j = (_i = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _i.kwargs) == null ? void 0 : _j.args) ?? ((_l = (_k = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _k.kwargs) == null ? void 0 : _l.parameterValues) ?? ((_m = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _m.args) ?? [];
|
|
191031
191111
|
parameterNames.forEach((name2, index2) => {
|
|
191032
|
-
|
|
191112
|
+
const value2 = argumentValues[index2];
|
|
191113
|
+
parameters[name2] = value2 === null || value2 === void 0 ? "" : String(value2);
|
|
191033
191114
|
});
|
|
191034
191115
|
console.log("🎯 ActionEditor - Function action detected:");
|
|
191035
191116
|
console.log(" - actionEntity:", actionEntity);
|
|
@@ -191042,6 +191123,8 @@ const ActionEditor = ({
|
|
|
191042
191123
|
functionName,
|
|
191043
191124
|
functionId,
|
|
191044
191125
|
parameters,
|
|
191126
|
+
argumentValues,
|
|
191127
|
+
parameterNames,
|
|
191045
191128
|
onFunctionSelect,
|
|
191046
191129
|
onFunctionCancel,
|
|
191047
191130
|
isNewlyCreated,
|
|
@@ -191050,8 +191133,8 @@ const ActionEditor = ({
|
|
|
191050
191133
|
);
|
|
191051
191134
|
}
|
|
191052
191135
|
if (isUploadFileAction) {
|
|
191053
|
-
const fileNames = ((
|
|
191054
|
-
const targetDescription = ((
|
|
191136
|
+
const fileNames = ((_o = (_n = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _n.kwargs) == null ? void 0 : _o.paths) || [];
|
|
191137
|
+
const targetDescription = ((_q = (_p = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _p.kwargs) == null ? void 0 : _q.target_description) || "";
|
|
191055
191138
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191056
191139
|
FileUploadEditor,
|
|
191057
191140
|
{
|
|
@@ -191066,8 +191149,8 @@ const ActionEditor = ({
|
|
|
191066
191149
|
);
|
|
191067
191150
|
}
|
|
191068
191151
|
if (isExtractContentAction) {
|
|
191069
|
-
const elementDescription = ((
|
|
191070
|
-
const variableName = ((
|
|
191152
|
+
const elementDescription = ((_s = (_r = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _r.kwargs) == null ? void 0 : _s.element_description) || "";
|
|
191153
|
+
const variableName = ((_u = (_t = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _t.kwargs) == null ? void 0 : _u.variable_name) || "";
|
|
191071
191154
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191072
191155
|
ExtractContentEditor,
|
|
191073
191156
|
{
|
|
@@ -191082,8 +191165,8 @@ const ActionEditor = ({
|
|
|
191082
191165
|
);
|
|
191083
191166
|
}
|
|
191084
191167
|
if (isLoginAction) {
|
|
191085
|
-
const testAccountId = (
|
|
191086
|
-
const environmentId = (
|
|
191168
|
+
const testAccountId = (_w = (_v = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _v.kwargs) == null ? void 0 : _w.test_account_id;
|
|
191169
|
+
const environmentId = (_y = (_x = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _x.kwargs) == null ? void 0 : _y.environment_id;
|
|
191087
191170
|
console.log("🔍 ActionEditor - Login action detected:", {
|
|
191088
191171
|
testAccountId,
|
|
191089
191172
|
environmentId,
|
|
@@ -191115,8 +191198,8 @@ const ActionEditor = ({
|
|
|
191115
191198
|
);
|
|
191116
191199
|
}
|
|
191117
191200
|
if (isWaitUntilAction) {
|
|
191118
|
-
const condition = ((
|
|
191119
|
-
const timeoutSeconds = ((
|
|
191201
|
+
const condition = ((_A = (_z = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _z.kwargs) == null ? void 0 : _A.condition) || "";
|
|
191202
|
+
const timeoutSeconds = ((_C = (_B = actionEntity == null ? void 0 : actionEntity.action_data) == null ? void 0 : _B.kwargs) == null ? void 0 : _C.timeout_seconds) || 60;
|
|
191120
191203
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191121
191204
|
WaitUntilEditor,
|
|
191122
191205
|
{
|
|
@@ -191282,6 +191365,32 @@ const YamlActionEntityEditor = ({
|
|
|
191282
191365
|
}
|
|
191283
191366
|
);
|
|
191284
191367
|
};
|
|
191368
|
+
const ACTIONS_WITH_STATEMENT_KWARG = /* @__PURE__ */ new Set(["ai_assert", "verify", "ai_action", "ai_step"]);
|
|
191369
|
+
function updateNonAssertionActionEntityDescription(actionEntity, newDescription) {
|
|
191370
|
+
const updatedActionEntity = {
|
|
191371
|
+
...actionEntity,
|
|
191372
|
+
action_description: newDescription
|
|
191373
|
+
};
|
|
191374
|
+
const actionData = updatedActionEntity.action_data;
|
|
191375
|
+
const actionName = actionData == null ? void 0 : actionData.action_name;
|
|
191376
|
+
if (actionData && actionName && ACTIONS_WITH_STATEMENT_KWARG.has(actionName)) {
|
|
191377
|
+
return {
|
|
191378
|
+
...updatedActionEntity,
|
|
191379
|
+
action_data: {
|
|
191380
|
+
...actionData,
|
|
191381
|
+
action_name: actionName,
|
|
191382
|
+
kwargs: {
|
|
191383
|
+
...actionData.kwargs,
|
|
191384
|
+
statement: newDescription
|
|
191385
|
+
}
|
|
191386
|
+
}
|
|
191387
|
+
};
|
|
191388
|
+
}
|
|
191389
|
+
if (actionName === "js_code") {
|
|
191390
|
+
return updatedActionEntity;
|
|
191391
|
+
}
|
|
191392
|
+
return void 0;
|
|
191393
|
+
}
|
|
191285
191394
|
const V2ActionSettingsPanel = ({
|
|
191286
191395
|
isAI,
|
|
191287
191396
|
onAIToggle,
|
|
@@ -191940,16 +192049,16 @@ const ActionStatement = ({
|
|
|
191940
192049
|
}
|
|
191941
192050
|
}, [id]);
|
|
191942
192051
|
const getDescription = () => {
|
|
191943
|
-
var _a2, _b2, _c2
|
|
192052
|
+
var _a2, _b2, _c2;
|
|
191944
192053
|
if (!effectiveActionEntity) {
|
|
191945
192054
|
return action.description || "";
|
|
191946
192055
|
}
|
|
191947
192056
|
const actionName = (_a2 = effectiveActionEntity.action_data) == null ? void 0 : _a2.action_name;
|
|
191948
192057
|
if (actionName === "js_code") {
|
|
191949
|
-
return
|
|
192058
|
+
return action.description || effectiveActionEntity.action_description || "";
|
|
191950
192059
|
} else {
|
|
191951
192060
|
if (displayOnly && displayMode === "healed") {
|
|
191952
|
-
return effectiveActionEntity.action_description || ((
|
|
192061
|
+
return effectiveActionEntity.action_description || ((_c2 = (_b2 = effectiveActionEntity.action_data) == null ? void 0 : _b2.kwargs) == null ? void 0 : _c2.statement) || action.description || "";
|
|
191953
192062
|
}
|
|
191954
192063
|
return action.description || effectiveActionEntity.action_description || "";
|
|
191955
192064
|
}
|
|
@@ -192064,29 +192173,7 @@ const ActionStatement = ({
|
|
|
192064
192173
|
}
|
|
192065
192174
|
};
|
|
192066
192175
|
} else if (updatedActionEntity) {
|
|
192067
|
-
updatedActionEntity =
|
|
192068
|
-
...updatedActionEntity,
|
|
192069
|
-
action_description: newDescription
|
|
192070
|
-
};
|
|
192071
|
-
const actionData = updatedActionEntity.action_data;
|
|
192072
|
-
const actionName = actionData == null ? void 0 : actionData.action_name;
|
|
192073
|
-
if (actionData && (actionName === "ai_assert" || actionName === "verify" || actionName === "ai_action" || actionName === "ai_step")) {
|
|
192074
|
-
updatedActionEntity = {
|
|
192075
|
-
...updatedActionEntity,
|
|
192076
|
-
action_data: {
|
|
192077
|
-
...actionData,
|
|
192078
|
-
action_name: actionName,
|
|
192079
|
-
// Ensure action_name is preserved
|
|
192080
|
-
kwargs: {
|
|
192081
|
-
...actionData.kwargs,
|
|
192082
|
-
statement: newDescription
|
|
192083
|
-
// Also keep it in kwargs.statement for backward compatibility
|
|
192084
|
-
}
|
|
192085
|
-
}
|
|
192086
|
-
};
|
|
192087
|
-
} else {
|
|
192088
|
-
updatedActionEntity = void 0;
|
|
192089
|
-
}
|
|
192176
|
+
updatedActionEntity = updateNonAssertionActionEntityDescription(updatedActionEntity, newDescription);
|
|
192090
192177
|
}
|
|
192091
192178
|
const updatedStatement = createUpdatedAction({
|
|
192092
192179
|
description: newDescription,
|
|
@@ -192117,19 +192204,15 @@ const ActionStatement = ({
|
|
|
192117
192204
|
var _a2, _b2;
|
|
192118
192205
|
markModified(id, "Action function selected");
|
|
192119
192206
|
if ((_b2 = (_a2 = action.action_entity) == null ? void 0 : _a2.action_data) == null ? void 0 : _b2.kwargs) {
|
|
192207
|
+
const updatedActionData = updateFunctionActionData(
|
|
192208
|
+
action.action_entity.action_data,
|
|
192209
|
+
func,
|
|
192210
|
+
paramValues
|
|
192211
|
+
);
|
|
192120
192212
|
const updatedStatement = createUpdatedAction({
|
|
192121
192213
|
action_entity: {
|
|
192122
192214
|
...action.action_entity,
|
|
192123
|
-
action_data:
|
|
192124
|
-
...action.action_entity.action_data,
|
|
192125
|
-
kwargs: {
|
|
192126
|
-
...action.action_entity.action_data.kwargs,
|
|
192127
|
-
functionName: func.name,
|
|
192128
|
-
functionId: func.id,
|
|
192129
|
-
parameterNames: Object.keys(paramValues || {}),
|
|
192130
|
-
parameterValues: Object.values(paramValues || {})
|
|
192131
|
-
}
|
|
192132
|
-
}
|
|
192215
|
+
action_data: updatedActionData
|
|
192133
192216
|
}
|
|
192134
192217
|
});
|
|
192135
192218
|
onStatementChange(updatedStatement);
|
|
@@ -201760,4 +201843,4 @@ export {
|
|
|
201760
201843
|
We as W,
|
|
201761
201844
|
reactExports as r
|
|
201762
201845
|
};
|
|
201763
|
-
//# sourceMappingURL=index-
|
|
201846
|
+
//# sourceMappingURL=index-DVb6b-JE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, W as We } from "./index-
|
|
1
|
+
import { r as reactExports, W as We } from "./index-DVb6b-JE.js";
|
|
2
2
|
function _defineProperty$1(obj, key, value) {
|
|
3
3
|
if (key in obj) {
|
|
4
4
|
Object.defineProperty(obj, key, {
|
|
@@ -649,4 +649,4 @@ export {
|
|
|
649
649
|
loader,
|
|
650
650
|
Le as useMonaco
|
|
651
651
|
};
|
|
652
|
-
//# sourceMappingURL=index-
|
|
652
|
+
//# sourceMappingURL=index-eFclB13U.js.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
/* Prevent FOUC */
|
|
9
9
|
body { margin: 0; background: #1a1b1e; color: #c1c2c5; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; }
|
|
10
10
|
</style>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DVb6b-JE.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-CrXycucL.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shiplightai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.97",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shiplight CLI for running and debugging .test.yaml files",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -58,12 +58,11 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@ai-sdk/anthropic": "^
|
|
62
|
-
"@ai-sdk/google": "^
|
|
63
|
-
"@ai-sdk/google-vertex": "^
|
|
64
|
-
"@ai-sdk/openai": "^
|
|
65
|
-
"@ai-sdk/provider": "^
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1.72",
|
|
61
|
+
"@ai-sdk/anthropic": "^4.0.24",
|
|
62
|
+
"@ai-sdk/google": "^4.0.28",
|
|
63
|
+
"@ai-sdk/google-vertex": "^5.0.35",
|
|
64
|
+
"@ai-sdk/openai": "^4.0.24",
|
|
65
|
+
"@ai-sdk/provider": "^4.0.4",
|
|
67
66
|
"@babel/parser": "^7.28.5",
|
|
68
67
|
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
69
68
|
"@google/genai": "^1.34.0",
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
"@babel/preset-env": "^7.26.9",
|
|
72
71
|
"@babel/preset-typescript": "^7.27.0",
|
|
73
72
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
74
|
-
"ai": "^
|
|
73
|
+
"ai": "^7.0.42",
|
|
75
74
|
"axios": "^1.15.0",
|
|
76
75
|
"chalk": "^4.1.2",
|
|
77
76
|
"commander": "^11.0.0",
|
|
@@ -85,7 +84,7 @@
|
|
|
85
84
|
"ora": "^5.4.1",
|
|
86
85
|
"otplib": "^13.4.0",
|
|
87
86
|
"p-retry": "^6.2.1",
|
|
88
|
-
"sharp": "
|
|
87
|
+
"sharp": "0.35.3",
|
|
89
88
|
"uuid": "^11.1.0",
|
|
90
89
|
"yaml": "^2.8.3",
|
|
91
90
|
"zod": "^3.22.0",
|
|
@@ -98,10 +97,9 @@
|
|
|
98
97
|
"@types/node": "^24.0.0",
|
|
99
98
|
"tsup": "^8.3.5",
|
|
100
99
|
"typescript": "5.5.4",
|
|
101
|
-
"
|
|
102
|
-
"sdk-core": "0.1.0",
|
|
100
|
+
"shiplight-types": "0.1.0",
|
|
103
101
|
"shiplight-tools": "1.0.0",
|
|
104
|
-
"
|
|
102
|
+
"sdk-core": "0.1.0"
|
|
105
103
|
},
|
|
106
104
|
"peerDependencies": {
|
|
107
105
|
"@playwright/test": "1.60.0"
|