@oya-ai/cli 1.0.94 → 1.0.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/dist/index.js +23 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -111,6 +111,14 @@ var Browser = class {
|
|
|
111
111
|
async pressKey(key) {
|
|
112
112
|
await this.command("press_key", { key });
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Answer a native dialog holding the page. alert() and beforeunload are
|
|
116
|
+
* answered for you; a confirm() or prompt() waits for this, and every other
|
|
117
|
+
* command fails fast with the dialog's text until it is answered.
|
|
118
|
+
*/
|
|
119
|
+
async handleDialog(accept, promptText) {
|
|
120
|
+
return this.command("handle_dialog", { accept, prompt_text: promptText });
|
|
121
|
+
}
|
|
114
122
|
/** `at` aims the wheel at an inner scroller (a results panel, a chat pane) instead of the page. */
|
|
115
123
|
async scroll(direction, amount, at) {
|
|
116
124
|
await this.command("scroll", at ? { direction, amount: amount ?? 500, ...at, smooth: false } : { direction, amount });
|
|
@@ -468,8 +476,21 @@ var Oya = class {
|
|
|
468
476
|
},
|
|
469
477
|
/** Store the second factor for this identity. Sealed at rest, never read back. */
|
|
470
478
|
setMfa: (id, config) => this.http.request("PUT", `/api/personas/${id}/mfa`, config),
|
|
471
|
-
clearMfa: async (id) => {
|
|
472
|
-
await this.http.request("DELETE", `/api/personas/${id}/mfa`);
|
|
479
|
+
clearMfa: async (id, domain) => {
|
|
480
|
+
await this.http.request("DELETE", `/api/personas/${id}/mfa${domain ? `?domain=${encodeURIComponent(domain)}` : ""}`);
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Store a site login for this identity. Sealed at rest, never read back.
|
|
484
|
+
*
|
|
485
|
+
* Signing in once on the desktop and inheriting the cookies is still the
|
|
486
|
+
* better path. This is for portals that expire a session server-side
|
|
487
|
+
* between runs, where an unattended run has nothing else to recover with.
|
|
488
|
+
*/
|
|
489
|
+
setCredentials: (id, config) => this.http.request("PUT", `/api/personas/${id}/credentials`, config),
|
|
490
|
+
/** Which sites this identity can sign in to. Usernames only. */
|
|
491
|
+
credentials: (id) => this.http.request("GET", `/api/personas/${id}/credentials`),
|
|
492
|
+
clearCredentials: async (id, domain) => {
|
|
493
|
+
await this.http.request("DELETE", `/api/personas/${id}/credentials?domain=${encodeURIComponent(domain)}`);
|
|
473
494
|
}
|
|
474
495
|
};
|
|
475
496
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oya-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.97",
|
|
4
4
|
"description": "Command line for the Oya browser control plane.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://browser.getoya.ai",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@oya-ai/browser": "1.0.
|
|
42
|
+
"@oya-ai/browser": "1.0.97",
|
|
43
43
|
"@types/node": "^20.19.43",
|
|
44
44
|
"tsup": "^8.0.0",
|
|
45
45
|
"typescript": "^5.4.0"
|