@flowriki/agent 0.1.0-beta.47 → 0.1.0-beta.49

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/cli.js CHANGED
@@ -2,14 +2,9 @@
2
2
  import {
3
3
  AGENT_LATEST_URL,
4
4
  AGENT_VERSION,
5
- CLOUD_PROVIDERS,
6
- CLOUD_PROVIDER_NAME,
7
- MobileLane,
8
- RecordedStepSchema,
9
5
  agentUpdateFor,
10
6
  authenticationResolver,
11
7
  checkAssertion,
12
- checkMobileAssertion,
13
8
  closeRunSession,
14
9
  connect,
15
10
  connectionFor,
@@ -19,6 +14,22 @@ import {
19
14
  executeStep,
20
15
  fieldNames,
21
16
  helperRunner,
17
+ openRunSession,
18
+ prepareBrowsers,
19
+ replayCase,
20
+ replayFlow,
21
+ resolveCheckouts,
22
+ resolveService,
23
+ runtimeValue,
24
+ start,
25
+ status
26
+ } from "./chunk-YXTWKSJ4.js";
27
+ import {
28
+ CLOUD_PROVIDERS,
29
+ CLOUD_PROVIDER_NAME,
30
+ MobileLane,
31
+ RecordedStepSchema,
32
+ checkMobileAssertion,
22
33
  isMobile,
23
34
  listDevices,
24
35
  locate,
@@ -27,24 +38,15 @@ import {
27
38
  mobileOf,
28
39
  mobileSetup,
29
40
  openMobileSession,
30
- openRunSession,
31
41
  parseGherkin,
32
42
  performMobileStep,
33
43
  platformsOf,
34
- prepareBrowsers,
35
- replayCase,
36
- replayFlow,
37
44
  replayMobileCase,
38
- resolveCheckouts,
39
- resolveService,
40
45
  runMobileSteps,
41
- runtimeValue,
42
46
  screenLines,
43
- start,
44
- status,
45
47
  stepRefusedOn,
46
48
  targetFor
47
- } from "./chunk-AMXSHZYE.js";
49
+ } from "./chunk-4VJVDGF5.js";
48
50
 
49
51
  // src/cli.ts
50
52
  import { parseArgs } from "util";
@@ -986,6 +988,7 @@ Review and publish it here: ${review}`;
986
988
  this.mobile = await openMobileSession({
987
989
  platform,
988
990
  mobile,
991
+ ...catalog.runWhere ? { where: catalog.runWhere[platform] } : {},
989
992
  ...draft.device ? { device: draft.device } : {},
990
993
  ...resolvers ? { resolveSecret: resolvers.resolveSecret } : {}
991
994
  });
@@ -1405,12 +1408,12 @@ It is now the project these tools work on. Open it: ${service.origin}/projects/$
1405
1408
  const chosen = c.mobile?.devices[p];
1406
1409
  return `${p === "android" ? "Android" : "iOS"} app: ${app ?? "(not set up \u2014 Settings \u2192 Mobile)"}
1407
1410
  Phones on this computer: ${here.length ? here.map((d) => `${d.name}${d.state === "ready" ? "" : ` (${d.state})`}`).join(", ") : "none"}` + (farms.length ? `
1408
- Cloud device farms: ${farms.join(", ")}` : "") + (chosen ? `
1409
- Runs go to: ${chosen.kind === "local" ? chosen.name || chosen.id : `${CLOUD_PROVIDER_NAME[chosen.provider]}: ${chosen.device}`}` : "");
1411
+ Cloud device farms: ${farms.join(", ")}` : "") + `
1412
+ Runs: ${c.runWhere?.[p] === "cloud" ? "in the cloud" : "on this computer"}` + (chosen ? ` \u2014 ${chosen.kind === "local" ? chosen.name || chosen.id : `${CLOUD_PROVIDER_NAME[chosen.provider]}: ${chosen.device}`}` : "");
1410
1413
  });
1411
1414
  return text([
1412
1415
  `Project ${projectId}. Tests: ${[platforms.web && "web", platforms.android && "Android app", platforms.ios && "iOS app"].filter(Boolean).join(", ")}.`,
1413
- platforms.web ? `Base URL: ${c.baseUrl || "(not set)"}` : "",
1416
+ platforms.web ? `Base URL: ${c.baseUrl || "(not set)"}${c.runWhere?.web === "cloud" ? " \u2014 test runs use a cloud browser; recording is on this computer" : ""}` : "",
1414
1417
  ...phoneLines,
1415
1418
  c.environments.length ? `Environments: ${c.environments.map((e) => `${e.name} ${e.baseUrl}`).join(", ")}` : "",
1416
1419
  `
@@ -2193,7 +2196,7 @@ function serveWithUpgrades(tools, info, opts) {
2193
2196
  } catch (error) {
2194
2197
  child?.kill();
2195
2198
  log(`could not start ${version}: ${error.message}`);
2196
- notice ??= `Flowriki ${version} is out (this connection runs ${opts.current}) and could not switch over by itself: ${error.message}. Reconnect Flowriki in Claude to start the new version.`;
2199
+ notice ??= `Flowriki ${version} is out (this connection runs ${opts.current}) and could not switch over by itself: ${error.message}. A new Claude session starts the new version.`;
2197
2200
  } finally {
2198
2201
  preparing = false;
2199
2202
  }
@@ -2206,7 +2209,7 @@ function serveWithUpgrades(tools, info, opts) {
2206
2209
  await opts.handOff().catch(() => void 0);
2207
2210
  active = next;
2208
2211
  if (timer) clearInterval(timer);
2209
- notice = `Flowriki updated itself from ${opts.current} to ${next.version} \u2014 the new version is answering now.` + (next.toolsChanged ? " It brings new or changed tools; if Claude does not offer them yet, reconnect Flowriki in Claude (in Claude Code: /mcp, then Reconnect)." : "");
2212
+ notice = `Flowriki updated itself from ${opts.current} to ${next.version} \u2014 the new version is answering now.` + (next.toolsChanged ? " It brings new or changed tools; if Claude does not offer them yet, start a new Claude session (in the terminal version of Claude Code, /mcp then Reconnect also works)." : "");
2210
2213
  send({ jsonrpc: "2.0", method: "notifications/tools/list_changed" });
2211
2214
  log(`switched to ${next.version}`);
2212
2215
  return true;
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ AGENT_HOME,
4
+ APPIUM_DIR,
5
+ AppiumMissing,
6
+ CLOUD_HUBS,
7
+ CheckError,
8
+ LocateError,
9
+ MOBILE_TIMEOUTS,
10
+ MobileLane,
11
+ MobileSession,
12
+ WebDriverError,
13
+ WebDriverSession,
14
+ adbPath,
15
+ androidHome,
16
+ appOf,
17
+ appiumPath,
18
+ appiumServer,
19
+ bootDevice,
20
+ centre,
21
+ checkMobileAssertion,
22
+ chooseDevice,
23
+ cloudDevices,
24
+ describeTarget,
25
+ filmsThis,
26
+ finishVideo,
27
+ javaHome,
28
+ listDevices,
29
+ locate,
30
+ mobileDoctor,
31
+ mobileSetup,
32
+ nodeAt,
33
+ openMobileSession,
34
+ performMobileStep,
35
+ readScreen,
36
+ replayMobileCase,
37
+ replayMobileFlow,
38
+ resolveOn,
39
+ run,
40
+ runMobileSteps,
41
+ screenLines,
42
+ stopAppium,
43
+ targetFor,
44
+ textOf,
45
+ toolEnv,
46
+ typesSecrets
47
+ } from "./chunk-4VJVDGF5.js";
48
+ export {
49
+ AGENT_HOME,
50
+ APPIUM_DIR,
51
+ AppiumMissing,
52
+ CLOUD_HUBS,
53
+ CheckError,
54
+ LocateError,
55
+ MOBILE_TIMEOUTS,
56
+ MobileLane,
57
+ MobileSession,
58
+ WebDriverError,
59
+ WebDriverSession,
60
+ adbPath,
61
+ androidHome,
62
+ appOf,
63
+ appiumPath,
64
+ appiumServer,
65
+ bootDevice,
66
+ centre,
67
+ checkMobileAssertion,
68
+ chooseDevice,
69
+ cloudDevices,
70
+ describeTarget,
71
+ filmsThis,
72
+ finishVideo,
73
+ javaHome,
74
+ listDevices,
75
+ locate,
76
+ mobileDoctor,
77
+ mobileSetup,
78
+ nodeAt,
79
+ openMobileSession,
80
+ performMobileStep,
81
+ readScreen,
82
+ replayMobileCase,
83
+ replayMobileFlow,
84
+ resolveOn,
85
+ runMobileSteps,
86
+ run as runTool,
87
+ screenLines,
88
+ stopAppium,
89
+ targetFor,
90
+ textOf,
91
+ toolEnv,
92
+ typesSecrets
93
+ };
package/dist/engine.js CHANGED
@@ -9,7 +9,8 @@ import {
9
9
  resolveCheckouts,
10
10
  start,
11
11
  status
12
- } from "./chunk-AMXSHZYE.js";
12
+ } from "./chunk-YXTWKSJ4.js";
13
+ import "./chunk-4VJVDGF5.js";
13
14
  export {
14
15
  AGENT_VERSION,
15
16
  browsersReady,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowriki/agent",
3
- "version": "0.1.0-beta.47",
3
+ "version": "0.1.0-beta.49",
4
4
  "description": "Run Flowriki UI tests on your own computer. Connects this machine to your Flowriki account.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",