stably 4.12.10 → 4.12.11
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
--- lib/mcp/browser/config.js
|
|
2
|
+
+++ lib/mcp/browser/config.js
|
|
3
|
+
@@ -305,7 +305,7 @@
|
|
4
|
+
function outputDir(config, clientInfo) {
|
|
5
|
+
if (config.outputDir)
|
|
6
|
+
return import_path.default.resolve(config.outputDir);
|
|
7
|
+
const rootPath = (0, import_server2.firstRootPath)(clientInfo);
|
|
8
|
+
if (rootPath)
|
|
9
|
+
- return import_path.default.resolve(rootPath, config.skillMode ? ".playwright-cli" : ".playwright-mcp");
|
|
10
|
+
+ return import_path.default.resolve(rootPath, config.skillMode ? ".stably-browser" : ".playwright-mcp");
|
|
11
|
+
const tmpDir = process.env.PW_TMPDIR_FOR_TEST ?? import_os.default.tmpdir();
|
|
@@ -118,6 +118,40 @@ class SessionLog {
|
|
|
118
118
|
lines.push("");
|
|
119
119
|
this._sessionFileQueue = this._sessionFileQueue.then(() => import_fs.default.promises.appendFile(this._file, lines.join("\n")));
|
|
120
120
|
}
|
|
121
|
+
logUserAction(action, tab, code, isUpdate) {
|
|
122
|
+
code = code.trim();
|
|
123
|
+
// Send recorder event for user action tracking
|
|
124
|
+
const actionForLog = { ...action };
|
|
125
|
+
delete actionForLog.ariaSnapshot;
|
|
126
|
+
delete actionForLog.selector;
|
|
127
|
+
actionForLog.isUpdate = !!isUpdate;
|
|
128
|
+
sendRecorderEvent({
|
|
129
|
+
type: "user-action",
|
|
130
|
+
action: actionForLog,
|
|
131
|
+
code,
|
|
132
|
+
url: tab.page.url(),
|
|
133
|
+
timestamp: Date.now()
|
|
134
|
+
});
|
|
135
|
+
// Also log to session file
|
|
136
|
+
const lines = [""];
|
|
137
|
+
lines.push(
|
|
138
|
+
`### User action: ${action.name}`,
|
|
139
|
+
"- Args",
|
|
140
|
+
"```json",
|
|
141
|
+
JSON.stringify(actionForLog, null, 2),
|
|
142
|
+
"```"
|
|
143
|
+
);
|
|
144
|
+
if (code) {
|
|
145
|
+
lines.push(
|
|
146
|
+
"- Code",
|
|
147
|
+
"```js",
|
|
148
|
+
code,
|
|
149
|
+
"```"
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
lines.push("");
|
|
153
|
+
this._sessionFileQueue = this._sessionFileQueue.then(() => import_fs.default.promises.appendFile(this._file, lines.join("\n")));
|
|
154
|
+
}
|
|
121
155
|
}
|
|
122
156
|
// Annotate the CommonJS export names for ESM import in node:
|
|
123
157
|
0 && (module.exports = {
|
package/dist/stably-browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// ../../app/node_modules/.pnpm/@stablyai-internal+playwright-cli@0.4.
|
|
3
|
+
// ../../app/node_modules/.pnpm/@stablyai-internal+playwright-cli@0.4.21/node_modules/@stablyai-internal/playwright-cli/playwright-cli.js
|
|
4
4
|
var fs = require("fs");
|
|
5
5
|
var path = require("path");
|
|
6
6
|
if (process.platform === "darwin" && !process.env.PLAYWRIGHT_DAEMON_SOCKETS_DIR) {
|
|
@@ -73,6 +73,11 @@ Notes:
|
|
|
73
73
|
process.exit(1);
|
|
74
74
|
}
|
|
75
75
|
} else {
|
|
76
|
+
if (process.env.STABLY_REQUIRE_REMOTE_BROWSER) {
|
|
77
|
+
console.error("Error: --config= is required in this environment (STABLY_REQUIRE_REMOTE_BROWSER is set).");
|
|
78
|
+
console.error("This usually means the browser setup was interrupted. Please retry the command.");
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
76
81
|
const sessionName = sessionFlag ? sessionFlag.split("=").slice(1).join("=") : "default";
|
|
77
82
|
const pwPkgPath = require.resolve("playwright/package.json", { paths: [__dirname] });
|
|
78
83
|
const { createClientInfo } = require(path.join(path.dirname(pwPkgPath), "lib", "cli", "client", "registry"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stably",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.11",
|
|
4
4
|
"packageManager": "pnpm@10.24.0",
|
|
5
5
|
"description": "AI-powered E2E Playwright testing CLI. Stably can understand your codebase, edit/run tests, and handle complex test scenarios for you.",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"playwright": "1.59.0-alpha-1771104257000",
|
|
88
88
|
"@stablyai/codegen-agent-constants": "workspace:*",
|
|
89
89
|
"@stablyai-internal/api-client": "workspace:*",
|
|
90
|
-
"@stablyai-internal/playwright-cli": "0.4.
|
|
90
|
+
"@stablyai-internal/playwright-cli": "0.4.21",
|
|
91
91
|
"@stablyai-internal/pwtrace": "0.3.1",
|
|
92
92
|
"@stablyai/agent-hooks": "workspace:*",
|
|
93
93
|
"@stablyai/agent-schemas": "workspace:*",
|