@oya-ai/cli 1.0.203 → 1.0.205
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 +25 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2133,7 +2133,9 @@ function shareLink(baseUrl, id, token2) {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
function startBody(options) {
|
|
2135
2135
|
const { profile, persona, provider, wsUrl, name, queueMs, priority, budgetUsd, governed, policy } = options;
|
|
2136
|
-
|
|
2136
|
+
const personaGroup = options.personaGroup || options.profileGroup;
|
|
2137
|
+
const runs = { profile: profile || persona, personaGroup };
|
|
2138
|
+
return { ...runs, provider, wsUrl, name, queueMs, priority, budgetUsd, governed, policy };
|
|
2137
2139
|
}
|
|
2138
2140
|
var idempotencyKeyOf = ({ idempotencyKey }) => idempotencyKey ? headerSafe(idempotencyKey, "idempotencyKey", 'Use letters, digits, "-" and "_".') : globalThis.crypto.randomUUID();
|
|
2139
2141
|
async function start(http, wait, options) {
|
|
@@ -2355,6 +2357,21 @@ var personaApi = (http) => ({
|
|
|
2355
2357
|
...loginCalls(http),
|
|
2356
2358
|
...cookieCalls(http)
|
|
2357
2359
|
});
|
|
2360
|
+
var personaGroupApi = (http) => ({
|
|
2361
|
+
/** Every group on this key. */
|
|
2362
|
+
list: async () => (await http().request("GET", "/api/persona-groups")).groups,
|
|
2363
|
+
/**
|
|
2364
|
+
* A new group of this key's personas (not the default one). Its name is what a
|
|
2365
|
+
* start passes, so it cannot change later; a name already used is a 409.
|
|
2366
|
+
*/
|
|
2367
|
+
create: (name, personaIds = []) => http().request("POST", "/api/persona-groups", { name, personaIds }),
|
|
2368
|
+
/** Replaces the group's members. */
|
|
2369
|
+
update: (name, personaIds) => http().request("PUT", `/api/persona-groups/${segment(name, "name")}`, { personaIds }),
|
|
2370
|
+
/** Deletes the group; its personas and their browsers are not touched. */
|
|
2371
|
+
remove: async (name) => {
|
|
2372
|
+
await http().request("DELETE", `/api/persona-groups/${segment(name, "name")}`);
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2358
2375
|
var configApi = (http) => ({
|
|
2359
2376
|
/** This key's settings. Secrets read back masked. */
|
|
2360
2377
|
get: () => http().request("GET", "/api/config"),
|
|
@@ -2525,6 +2542,13 @@ var Oya = class {
|
|
|
2525
2542
|
config = configApi(() => this.http);
|
|
2526
2543
|
/** Saved profiles. `personas` is retained as an alias for existing clients. */
|
|
2527
2544
|
profiles = this.personas;
|
|
2545
|
+
/**
|
|
2546
|
+
* Persona groups: name a set of your personas, then start browsers with
|
|
2547
|
+
* `oya.browser.start({ personaGroup: name })` to spread them across the set.
|
|
2548
|
+
*/
|
|
2549
|
+
personaGroups = personaGroupApi(() => this.http);
|
|
2550
|
+
/** The same as `personaGroups`, matching the `profiles` alias. */
|
|
2551
|
+
profileGroups = this.personaGroups;
|
|
2528
2552
|
/** What this key has spent. */
|
|
2529
2553
|
usage() {
|
|
2530
2554
|
return this.http.request("GET", "/api/usage");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oya-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.205",
|
|
4
4
|
"description": "Command line for the Oya browser control plane.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://oyabrowser.com",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@oya-ai/browser": "1.0.
|
|
53
|
+
"@oya-ai/browser": "1.0.205",
|
|
54
54
|
"@types/node": "^20.19.43",
|
|
55
55
|
"tsup": "^9.0.0",
|
|
56
56
|
"typescript": "^6.0.3"
|