codeloop-mcp-server 0.1.75 → 0.1.77

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.
Files changed (42) hide show
  1. package/dist/evidence/interaction_evidence.d.ts +46 -0
  2. package/dist/evidence/interaction_evidence.d.ts.map +1 -0
  3. package/dist/evidence/interaction_evidence.js +91 -0
  4. package/dist/evidence/interaction_evidence.js.map +1 -0
  5. package/dist/evidence/runtime_log_scan.d.ts.map +1 -1
  6. package/dist/evidence/runtime_log_scan.js +10 -0
  7. package/dist/evidence/runtime_log_scan.js.map +1 -1
  8. package/dist/index.js +28 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/runners/app_launcher.d.ts +47 -0
  11. package/dist/runners/app_launcher.d.ts.map +1 -0
  12. package/dist/runners/app_launcher.js +300 -0
  13. package/dist/runners/app_launcher.js.map +1 -0
  14. package/dist/runners/cli_auth.d.ts +35 -0
  15. package/dist/runners/cli_auth.d.ts.map +1 -0
  16. package/dist/runners/cli_auth.js +127 -0
  17. package/dist/runners/cli_auth.js.map +1 -0
  18. package/dist/runners/journey_to_maestro.d.ts +31 -0
  19. package/dist/runners/journey_to_maestro.d.ts.map +1 -0
  20. package/dist/runners/journey_to_maestro.js +101 -0
  21. package/dist/runners/journey_to_maestro.js.map +1 -0
  22. package/dist/runners/maestro_generator.d.ts +5 -1
  23. package/dist/runners/maestro_generator.d.ts.map +1 -1
  24. package/dist/runners/maestro_generator.js +12 -4
  25. package/dist/runners/maestro_generator.js.map +1 -1
  26. package/dist/runners/mobile_app_id.d.ts +7 -0
  27. package/dist/runners/mobile_app_id.d.ts.map +1 -0
  28. package/dist/runners/mobile_app_id.js +100 -0
  29. package/dist/runners/mobile_app_id.js.map +1 -0
  30. package/dist/tools/diagnose.js +8 -0
  31. package/dist/tools/diagnose.js.map +1 -1
  32. package/dist/tools/gate_check.d.ts.map +1 -1
  33. package/dist/tools/gate_check.js +29 -0
  34. package/dist/tools/gate_check.js.map +1 -1
  35. package/dist/tools/run_journey.d.ts +14 -0
  36. package/dist/tools/run_journey.d.ts.map +1 -1
  37. package/dist/tools/run_journey.js +170 -6
  38. package/dist/tools/run_journey.js.map +1 -1
  39. package/dist/tools/verify.d.ts.map +1 -1
  40. package/dist/tools/verify.js +68 -2
  41. package/dist/tools/verify.js.map +1 -1
  42. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ import type { JourneyTarget } from "./interaction_engine.js";
2
+ export interface AppLaunchHandle {
3
+ /** The app is now running on the target and ready to drive. */
4
+ launched: boolean;
5
+ /** How it was launched (for logs/diagnostics). */
6
+ method: string;
7
+ /** The device id / udid / desktop device the app was launched on. */
8
+ device?: string;
9
+ /** Why launch did not happen / failed (when launched===false). */
10
+ reason?: string;
11
+ /** Tail of launcher output when a build/launch fails — real signal for the agent. */
12
+ error_excerpt?: string;
13
+ /** Stop the launched app (quit `flutter run`, kill the process). Best-effort. */
14
+ stop?: () => Promise<void>;
15
+ }
16
+ /**
17
+ * Map a journey target + host OS to the `flutter run -d <device>` device id.
18
+ * Mobile uses the booted serial/udid; desktop uses the host platform device.
19
+ */
20
+ export declare function flutterDeviceId(target: JourneyTarget, bootedDevice?: string): string | null;
21
+ /** True when the directory is a Flutter project. */
22
+ export declare function isFlutterProject(cwd: string): boolean;
23
+ export interface LaunchAppOptions {
24
+ cwd: string;
25
+ target: JourneyTarget;
26
+ /** Booted device serial/udid from bootDevice (mobile). */
27
+ bootedDevice?: string;
28
+ /** Where to tee launcher stdout/stderr (best-effort). */
29
+ logPath?: string;
30
+ /** Max time to wait for the app to come up (build can be slow). */
31
+ readyTimeoutMs?: number;
32
+ /** Optional extra args (flavor/target/dart-define). */
33
+ extraArgs?: string[];
34
+ }
35
+ /**
36
+ * Launch the app for an interactive journey. Returns a handle whose `stop()`
37
+ * quits the app. Only the Flutter path actually builds+launches today; native
38
+ * mobile degrades to a directive (launched:false).
39
+ */
40
+ export declare function launchApp(opts: LaunchAppOptions): Promise<AppLaunchHandle>;
41
+ /** Does the dir look like a real Gradle/Android project worth building? */
42
+ export declare function hasAndroidGradleProject(cwd: string): boolean;
43
+ /** Prefer an .xcworkspace, else an .xcodeproj, as the xcodebuild container. */
44
+ export declare function buildXcodebuildContainerArgs(cwd: string): string[];
45
+ /** Parse the first scheme name from `xcodebuild -list -json` output. */
46
+ export declare function parseFirstScheme(jsonText: string): string | null;
47
+ //# sourceMappingURL=app_launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app_launcher.d.ts","sourceRoot":"","sources":["../../src/runners/app_launcher.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAUD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY3F;AAED,oDAAoD;AACpD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAID;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAehF;AAKD,2EAA2E;AAC3E,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAW5D;AAiGD,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYlE;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUhE"}
@@ -0,0 +1,300 @@
1
+ /**
2
+ * app_launcher — actually OPEN the app under test for the deep-E2E executor.
3
+ *
4
+ * Booting a simulator/emulator (device_probe.bootDevice) is NOT enough: a blank
5
+ * booted device has no app running, so there is nothing to screenshot or drive.
6
+ * This module performs the missing step — it BUILDS + INSTALLS + LAUNCHES the
7
+ * app on the resolved target so the journey has a live UI to interact with.
8
+ *
9
+ * Flutter is the primary path: `flutter run -d <device>` builds, installs, and
10
+ * launches on the booted emulator/simulator (or desktop), and stays attached so
11
+ * we can quit it cleanly afterwards. A build/launch FAILURE here is real,
12
+ * valuable signal ("the app doesn't even start"), surfaced as launched:false
13
+ * with the error tail rather than swallowed.
14
+ *
15
+ * Native iOS/Android (no Flutter) build+install is project-specific (schemes,
16
+ * flavors, signing); for those we degrade to launched:false + a clear directive
17
+ * so the agent launches the app, instead of silently driving a blank screen.
18
+ *
19
+ * Never throws; always returns a handle (with a best-effort stop()).
20
+ */
21
+ import { spawn } from "child_process";
22
+ import { existsSync, readdirSync } from "fs";
23
+ import { join } from "path";
24
+ import { platform } from "os";
25
+ import { checkToolAvailable, runCommand } from "./base.js";
26
+ import { resolveMobileAppId } from "./mobile_app_id.js";
27
+ /** Output lines that mean the Flutter app finished launching and is live. */
28
+ const FLUTTER_READY = /(Flutter run key commands|Dart VM Service is listening|VM Service|DevTools|is being served at|Syncing files to device|Application finished|Hot reload|Flutter DevTools|✓ +Built)/i;
29
+ /** Output lines that mean the Flutter build/launch FAILED (don't keep waiting). */
30
+ const FLUTTER_FAILED = /(Gradle task assemble\w+ failed|Could not build|Build failed|Error launching application|No supported devices|FAILURE: Build failed|Module '[^']+' not found|The Xcode build|Encountered error while building|Error: .*\.dart:|Target .* failed|Exception:)/i;
31
+ /**
32
+ * Map a journey target + host OS to the `flutter run -d <device>` device id.
33
+ * Mobile uses the booted serial/udid; desktop uses the host platform device.
34
+ */
35
+ export function flutterDeviceId(target, bootedDevice) {
36
+ if (target === "android_emulator" || target === "ios_simulator") {
37
+ return bootedDevice ?? null;
38
+ }
39
+ if (target === "desktop") {
40
+ const os = platform();
41
+ if (os === "darwin")
42
+ return "macos";
43
+ if (os === "win32")
44
+ return "windows";
45
+ return "linux";
46
+ }
47
+ if (target === "browser")
48
+ return "chrome";
49
+ return null;
50
+ }
51
+ /** True when the directory is a Flutter project. */
52
+ export function isFlutterProject(cwd) {
53
+ return existsSync(join(cwd, "pubspec.yaml"));
54
+ }
55
+ const DEFAULT_READY_TIMEOUT_MS = 240_000; // cold build + install can take minutes
56
+ /**
57
+ * Launch the app for an interactive journey. Returns a handle whose `stop()`
58
+ * quits the app. Only the Flutter path actually builds+launches today; native
59
+ * mobile degrades to a directive (launched:false).
60
+ */
61
+ export async function launchApp(opts) {
62
+ const { cwd, target } = opts;
63
+ if (isFlutterProject(cwd)) {
64
+ return launchFlutter(opts);
65
+ }
66
+ // Native iOS / Android (no Flutter): build + install + launch best-effort.
67
+ if (target === "android_emulator")
68
+ return launchNativeAndroid(opts);
69
+ if (target === "ios_simulator")
70
+ return launchNativeIos(opts);
71
+ return {
72
+ launched: false,
73
+ method: "unknown",
74
+ reason: `No launcher for target "${target}" on a non-Flutter project — launch the app manually, then drive with codeloop_interact.`,
75
+ };
76
+ }
77
+ const NATIVE_BUILD_TIMEOUT_MS = 600_000; // native builds can be slow (cold)
78
+ const NATIVE_CMD_TIMEOUT_MS = 90_000;
79
+ /** Does the dir look like a real Gradle/Android project worth building? */
80
+ export function hasAndroidGradleProject(cwd) {
81
+ return [
82
+ "gradlew",
83
+ "gradlew.bat",
84
+ "settings.gradle",
85
+ "settings.gradle.kts",
86
+ "build.gradle",
87
+ "build.gradle.kts",
88
+ join("app", "build.gradle"),
89
+ join("app", "build.gradle.kts"),
90
+ ].some((p) => existsSync(join(cwd, p)));
91
+ }
92
+ /** Native Android: ./gradlew :app:installDebug, then launch via monkey. */
93
+ async function launchNativeAndroid(opts) {
94
+ const { cwd } = opts;
95
+ // Fast degrade before invoking slow Gradle when there's no project here.
96
+ if (!hasAndroidGradleProject(cwd)) {
97
+ return { launched: false, method: "native-android", reason: "No Android Gradle project found — build & install manually (./gradlew installDebug), then drive with codeloop_interact." };
98
+ }
99
+ const hasGradlew = existsSync(join(cwd, "gradlew")) || existsSync(join(cwd, "gradlew.bat"));
100
+ if (!hasGradlew && !(await checkToolAvailable("gradle"))) {
101
+ return { launched: false, method: "native-android", reason: "No gradlew/gradle found — build & install manually (./gradlew installDebug), then drive with codeloop_interact." };
102
+ }
103
+ const appId = resolveMobileAppId(cwd, "android");
104
+ const gradleCmd = hasGradlew ? (platform() === "win32" ? "gradlew.bat" : "./gradlew") : "gradle";
105
+ const install = await runCommand(gradleCmd, [":app:installDebug"], cwd, opts.logPath, undefined, opts.readyTimeoutMs ?? NATIVE_BUILD_TIMEOUT_MS);
106
+ if (install.exit_code !== 0) {
107
+ // Retry the non-scoped task name (some projects don't use :app:).
108
+ const retry = await runCommand(gradleCmd, ["installDebug"], cwd, opts.logPath, undefined, opts.readyTimeoutMs ?? NATIVE_BUILD_TIMEOUT_MS);
109
+ if (retry.exit_code !== 0) {
110
+ return {
111
+ launched: false,
112
+ method: "gradlew installDebug",
113
+ reason: "Android build/install failed — the app does not build on the emulator.",
114
+ error_excerpt: tail(install.stdout + install.stderr + retry.stdout + retry.stderr),
115
+ };
116
+ }
117
+ }
118
+ if (!appId) {
119
+ return { launched: true, method: "gradlew installDebug", device: opts.bootedDevice, reason: "Installed but could not resolve applicationId to auto-launch — open the app from the launcher (then it can be driven)." };
120
+ }
121
+ const serialArgs = opts.bootedDevice ? ["-s", opts.bootedDevice] : [];
122
+ await runCommand("adb", [...serialArgs, "shell", "monkey", "-p", appId, "-c", "android.intent.category.LAUNCHER", "1"], cwd, undefined, undefined, NATIVE_CMD_TIMEOUT_MS);
123
+ await new Promise((r) => setTimeout(r, 2500));
124
+ return { launched: true, method: `gradlew installDebug + launch ${appId}`, device: opts.bootedDevice };
125
+ }
126
+ /** Native iOS (macOS): xcodebuild -> simctl install -> simctl launch. */
127
+ async function launchNativeIos(opts) {
128
+ const { cwd } = opts;
129
+ if (platform() !== "darwin") {
130
+ return { launched: false, method: "native-ios", reason: "iOS builds require macOS." };
131
+ }
132
+ // Fast degrade before invoking slow xcodebuild when there's no project here.
133
+ const listArgs = buildXcodebuildContainerArgs(cwd);
134
+ if (listArgs.length === 0) {
135
+ return { launched: false, method: "native-ios", reason: "No Xcode project/workspace (.xcodeproj/.xcworkspace) found to build with xcodebuild — open it and run once, or build+install manually (xcodebuild build + xcrun simctl install/launch)." };
136
+ }
137
+ if (!(await checkToolAvailable("xcodebuild")) || !(await checkToolAvailable("xcrun"))) {
138
+ return { launched: false, method: "native-ios", reason: "xcodebuild/xcrun not on PATH — install Xcode + command line tools." };
139
+ }
140
+ const udid = opts.bootedDevice;
141
+ if (!udid) {
142
+ return { launched: false, method: "native-ios", reason: "No booted simulator udid to install onto." };
143
+ }
144
+ const bundleId = resolveMobileAppId(cwd, "ios");
145
+ // Resolve a scheme from `xcodebuild -list -json`.
146
+ const list = await runCommand("xcodebuild", [...listArgs, "-list", "-json"], cwd, undefined, undefined, NATIVE_CMD_TIMEOUT_MS);
147
+ const scheme = parseFirstScheme(list.stdout);
148
+ if (!scheme) {
149
+ return { launched: false, method: "native-ios", reason: "Could not resolve an Xcode scheme — open the workspace and build/run once, or set it up, then retry.", error_excerpt: tail(list.stdout + list.stderr) };
150
+ }
151
+ const derived = join(cwd, "build", "codeloop-derived");
152
+ const build = await runCommand("xcodebuild", [...listArgs, "-scheme", scheme, "-configuration", "Debug", "-destination", `platform=iOS Simulator,id=${udid}`, "-derivedDataPath", derived, "build"], cwd, opts.logPath, undefined, opts.readyTimeoutMs ?? NATIVE_BUILD_TIMEOUT_MS);
153
+ if (build.exit_code !== 0) {
154
+ return { launched: false, method: `xcodebuild -scheme ${scheme}`, reason: "iOS build failed — the app does not build for the simulator.", error_excerpt: tail(build.stdout + build.stderr) };
155
+ }
156
+ const appPath = join(derived, "Build", "Products", "Debug-iphonesimulator");
157
+ let appBundle = null;
158
+ try {
159
+ appBundle = readdirSync(appPath).find((f) => f.endsWith(".app")) ?? null;
160
+ }
161
+ catch { /* ignore */ }
162
+ if (!appBundle) {
163
+ return { launched: false, method: "native-ios", reason: `Built but no .app found under ${appPath}.`, error_excerpt: tail(build.stdout) };
164
+ }
165
+ const fullApp = join(appPath, appBundle);
166
+ const installed = await runCommand("xcrun", ["simctl", "install", udid, fullApp], cwd, undefined, undefined, NATIVE_CMD_TIMEOUT_MS);
167
+ if (installed.exit_code !== 0) {
168
+ return { launched: false, method: "simctl install", reason: "simctl install failed.", error_excerpt: tail(installed.stdout + installed.stderr) };
169
+ }
170
+ if (!bundleId) {
171
+ return { launched: true, method: "simctl install", device: udid, reason: "Installed but could not resolve the bundle id to auto-launch — open it in the simulator." };
172
+ }
173
+ await runCommand("xcrun", ["simctl", "launch", udid, bundleId], cwd, undefined, undefined, NATIVE_CMD_TIMEOUT_MS);
174
+ await new Promise((r) => setTimeout(r, 2500));
175
+ return { launched: true, method: `xcodebuild + simctl launch ${bundleId}`, device: udid };
176
+ }
177
+ /** Prefer an .xcworkspace, else an .xcodeproj, as the xcodebuild container. */
178
+ export function buildXcodebuildContainerArgs(cwd) {
179
+ try {
180
+ for (const base of [join(cwd, "ios"), cwd]) {
181
+ let entries = [];
182
+ try {
183
+ entries = readdirSync(base);
184
+ }
185
+ catch {
186
+ continue;
187
+ }
188
+ const ws = entries.find((e) => e.endsWith(".xcworkspace"));
189
+ if (ws)
190
+ return ["-workspace", join(base, ws)];
191
+ const proj = entries.find((e) => e.endsWith(".xcodeproj"));
192
+ if (proj)
193
+ return ["-project", join(base, proj)];
194
+ }
195
+ }
196
+ catch { /* ignore */ }
197
+ return [];
198
+ }
199
+ /** Parse the first scheme name from `xcodebuild -list -json` output. */
200
+ export function parseFirstScheme(jsonText) {
201
+ try {
202
+ const obj = JSON.parse(jsonText);
203
+ const schemes = obj.workspace?.schemes ?? obj.project?.schemes ?? [];
204
+ // Prefer a non-test scheme.
205
+ const pick = schemes.find((s) => !/test/i.test(s)) ?? schemes[0];
206
+ return pick ?? null;
207
+ }
208
+ catch {
209
+ return null;
210
+ }
211
+ }
212
+ function tail(s) {
213
+ return s.split("\n").filter(Boolean).slice(-25).join("\n");
214
+ }
215
+ async function launchFlutter(opts) {
216
+ const { cwd, target } = opts;
217
+ const device = flutterDeviceId(target, opts.bootedDevice);
218
+ if (!device) {
219
+ return { launched: false, method: "flutter run", reason: `Could not resolve a flutter device id for target "${target}".` };
220
+ }
221
+ if (!(await checkToolAvailable("flutter"))) {
222
+ return {
223
+ launched: false,
224
+ method: "flutter run",
225
+ device,
226
+ reason: "flutter not on PATH — install the Flutter SDK to auto-launch the app, then drive with codeloop_interact.",
227
+ };
228
+ }
229
+ const args = ["run", "-d", device, "--no-pub", ...(opts.extraArgs ?? [])];
230
+ const readyTimeoutMs = opts.readyTimeoutMs ?? DEFAULT_READY_TIMEOUT_MS;
231
+ let child;
232
+ try {
233
+ child = spawn("flutter", args, { cwd, stdio: ["pipe", "pipe", "pipe"], detached: false });
234
+ }
235
+ catch (e) {
236
+ return { launched: false, method: "flutter run", device, reason: `Failed to spawn flutter run: ${e.message}` };
237
+ }
238
+ let buffer = "";
239
+ const onData = (d) => { buffer += d.toString(); if (buffer.length > 200_000)
240
+ buffer = buffer.slice(-100_000); };
241
+ child.stdout?.on("data", onData);
242
+ child.stderr?.on("data", onData);
243
+ const stop = async () => {
244
+ try {
245
+ // Ask `flutter run` to quit cleanly first (detaches + stops the app).
246
+ child.stdin?.write("q\n");
247
+ await new Promise((r) => setTimeout(r, 1500));
248
+ }
249
+ catch { /* ignore */ }
250
+ try {
251
+ if (child.pid && !child.killed) {
252
+ // Kill the whole process tree so the device-side app + tool exit.
253
+ if (platform() === "win32")
254
+ spawn("taskkill", ["/pid", String(child.pid), "/T", "/F"]);
255
+ else
256
+ process.kill(-child.pid, "SIGKILL");
257
+ }
258
+ }
259
+ catch {
260
+ try {
261
+ child.kill("SIGKILL");
262
+ }
263
+ catch { /* ignore */ }
264
+ }
265
+ };
266
+ // Poll the captured output for ready / failure / process-exit / timeout.
267
+ const deadline = Date.now() + readyTimeoutMs;
268
+ let exited = false;
269
+ child.on("exit", () => { exited = true; });
270
+ while (Date.now() < deadline) {
271
+ if (FLUTTER_READY.test(buffer)) {
272
+ // Give the first frame a moment to render before we screenshot/drive.
273
+ await new Promise((r) => setTimeout(r, 2500));
274
+ return { launched: true, method: `flutter run -d ${device}`, device, stop };
275
+ }
276
+ if (FLUTTER_FAILED.test(buffer) || exited) {
277
+ await stop();
278
+ return {
279
+ launched: false,
280
+ method: `flutter run -d ${device}`,
281
+ device,
282
+ reason: exited
283
+ ? "flutter run exited before the app came up — the app failed to build/launch on the device."
284
+ : "flutter run reported a build/launch error — the app does not start on the device.",
285
+ error_excerpt: buffer.split("\n").filter(Boolean).slice(-25).join("\n"),
286
+ };
287
+ }
288
+ await new Promise((r) => setTimeout(r, 2000));
289
+ }
290
+ // Timed out waiting for the app to come up.
291
+ await stop();
292
+ return {
293
+ launched: false,
294
+ method: `flutter run -d ${device}`,
295
+ device,
296
+ reason: `App did not finish launching within ${Math.round(readyTimeoutMs / 1000)}s (slow build or stuck on the device).`,
297
+ error_excerpt: buffer.split("\n").filter(Boolean).slice(-25).join("\n"),
298
+ };
299
+ }
300
+ //# sourceMappingURL=app_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IAC5C,MAAM,IAAI,EAAE,CAAC;IACb,OAAO;QACL,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,kBAAkB,MAAM,EAAE;QAClC,MAAM;QACN,MAAM,EAAE,uCAAuC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,wCAAwC;QACxH,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;KACxE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * cli_auth — detect EXPIRED / MISSING provider-CLI logins and push the agent to
3
+ * re-authenticate so the rest of verification (backend emulators, remote logs,
4
+ * and the full visual journey) can proceed.
5
+ *
6
+ * When a developer's `firebase` / `gcloud` / `heroku` / … session has expired,
7
+ * an auto-detected backend (e.g. the Firebase Emulator Suite) can't start and
8
+ * remote-log pulls fail. That is NOT a code bug — it's a one-step auth fix. The
9
+ * right behaviour is to STOP guessing and tell the agent to run the exact login
10
+ * command in an interactive terminal so the USER can complete the browser
11
+ * sign-in, then re-run codeloop_verify and the visual journey.
12
+ */
13
+ export interface CliAuthIssue {
14
+ /** Canonical CLI name, e.g. "firebase". */
15
+ cli: string;
16
+ /** Friendly label, e.g. "Firebase". */
17
+ label: string;
18
+ /** The exact interactive command to re-authenticate. */
19
+ login_command: string;
20
+ }
21
+ /**
22
+ * PURE: scan CLI/log output for expired-auth signatures and return the set of
23
+ * providers that need re-authentication (deduped, in table order).
24
+ */
25
+ export declare function detectExpiredCliAuth(text: string): CliAuthIssue[];
26
+ /** Look up a provider's interactive login command by CLI name. */
27
+ export declare function loginCommandFor(cli: string): string | null;
28
+ /**
29
+ * Build a HARD directive that pushes the agent to run the re-auth command(s) in
30
+ * an INTERACTIVE terminal so the user can complete sign-in, then re-run so the
31
+ * full verification (incl. visual journey) proceeds. `context` tunes the
32
+ * trailing instruction.
33
+ */
34
+ export declare function buildCliAuthDirective(issues: CliAuthIssue[], context: "backend" | "remote-logs"): string;
35
+ //# sourceMappingURL=cli_auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli_auth.d.ts","sourceRoot":"","sources":["../../src/runners/cli_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;CACvB;AAiFD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CASjE;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG1D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EAAE,EACtB,OAAO,EAAE,SAAS,GAAG,aAAa,GACjC,MAAM,CAoBR"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * cli_auth — detect EXPIRED / MISSING provider-CLI logins and push the agent to
3
+ * re-authenticate so the rest of verification (backend emulators, remote logs,
4
+ * and the full visual journey) can proceed.
5
+ *
6
+ * When a developer's `firebase` / `gcloud` / `heroku` / … session has expired,
7
+ * an auto-detected backend (e.g. the Firebase Emulator Suite) can't start and
8
+ * remote-log pulls fail. That is NOT a code bug — it's a one-step auth fix. The
9
+ * right behaviour is to STOP guessing and tell the agent to run the exact login
10
+ * command in an interactive terminal so the USER can complete the browser
11
+ * sign-in, then re-run codeloop_verify and the visual journey.
12
+ */
13
+ /**
14
+ * Provider table. login_command is the canonical interactive re-auth command.
15
+ * Signatures are intentionally provider-specific so we name the right CLI.
16
+ */
17
+ const PROVIDERS = [
18
+ {
19
+ cli: "firebase",
20
+ label: "Firebase",
21
+ login_command: "firebase login --reauth",
22
+ signatures: [
23
+ /firebase login --reauth/i,
24
+ /credentials are no longer valid/i,
25
+ /Failed to (?:list|retrieve) log entries.*Google Cloud/i,
26
+ /run `firebase login`/i,
27
+ /Authentication Error.*firebase/i,
28
+ ],
29
+ },
30
+ {
31
+ cli: "gcloud",
32
+ label: "Google Cloud (gcloud)",
33
+ login_command: "gcloud auth login",
34
+ signatures: [
35
+ /gcloud auth (?:login|application-default login)/i,
36
+ /Your current active account.*does not have any valid credentials/i,
37
+ /Reauthentication failed|invalid_grant/i,
38
+ ],
39
+ },
40
+ {
41
+ cli: "heroku",
42
+ label: "Heroku",
43
+ login_command: "heroku login",
44
+ signatures: [/heroku login/i, /not logged in.*heroku/i, /Invalid credentials.*heroku/i],
45
+ },
46
+ {
47
+ cli: "vercel",
48
+ label: "Vercel",
49
+ login_command: "vercel login",
50
+ signatures: [/vercel login/i, /not authenticated.*vercel/i, /Please log in.*vercel/i],
51
+ },
52
+ {
53
+ cli: "fly",
54
+ label: "Fly.io",
55
+ login_command: "fly auth login",
56
+ signatures: [/fly(?:ctl)? auth login/i, /not logged in.*fly/i],
57
+ },
58
+ {
59
+ cli: "aws",
60
+ label: "AWS",
61
+ login_command: "aws sso login # (or: aws configure)",
62
+ signatures: [/aws sso login/i, /The SSO session.*has expired/i, /ExpiredToken|InvalidClientTokenId/i],
63
+ },
64
+ {
65
+ cli: "gh",
66
+ label: "GitHub CLI",
67
+ login_command: "gh auth login",
68
+ signatures: [/gh auth login/i, /authentication required.*gh/i],
69
+ },
70
+ {
71
+ cli: "az",
72
+ label: "Azure",
73
+ login_command: "az login",
74
+ signatures: [/\baz login\b/i, /az account.*not.*logged in/i, /AADSTS\d+/i],
75
+ },
76
+ {
77
+ cli: "supabase",
78
+ label: "Supabase",
79
+ login_command: "supabase login",
80
+ signatures: [/supabase login/i, /Access token not provided.*supabase/i],
81
+ },
82
+ ];
83
+ /**
84
+ * PURE: scan CLI/log output for expired-auth signatures and return the set of
85
+ * providers that need re-authentication (deduped, in table order).
86
+ */
87
+ export function detectExpiredCliAuth(text) {
88
+ if (!text)
89
+ return [];
90
+ const out = [];
91
+ for (const p of PROVIDERS) {
92
+ if (p.signatures.some((re) => re.test(text))) {
93
+ out.push({ cli: p.cli, label: p.label, login_command: p.login_command });
94
+ }
95
+ }
96
+ return out;
97
+ }
98
+ /** Look up a provider's interactive login command by CLI name. */
99
+ export function loginCommandFor(cli) {
100
+ const p = PROVIDERS.find((x) => x.cli === cli.toLowerCase());
101
+ return p ? p.login_command : null;
102
+ }
103
+ /**
104
+ * Build a HARD directive that pushes the agent to run the re-auth command(s) in
105
+ * an INTERACTIVE terminal so the user can complete sign-in, then re-run so the
106
+ * full verification (incl. visual journey) proceeds. `context` tunes the
107
+ * trailing instruction.
108
+ */
109
+ export function buildCliAuthDirective(issues, context) {
110
+ if (issues.length === 0)
111
+ return "";
112
+ const lines = [];
113
+ lines.push("[CodeLoop AUTH] A provider CLI login has EXPIRED — this is a one-step auth fix, NOT a code bug. " +
114
+ (context === "backend"
115
+ ? "Because of it, the backend (e.g. the Firebase Emulator Suite) could not start, so backend + interactive visual verification were blocked."
116
+ : "Because of it, production/3rd-party logs could not be pulled."));
117
+ lines.push("");
118
+ lines.push("ACTION — run the matching command in an INTERACTIVE terminal so the USER can complete the browser sign-in:");
119
+ for (const i of issues) {
120
+ lines.push(` ${i.login_command} # re-authenticate ${i.label}`);
121
+ }
122
+ lines.push("");
123
+ lines.push("Do NOT skip silently and do NOT 'fix' source code for this. After the user finishes signing in, re-run codeloop_verify; " +
124
+ "then call codeloop_run_journey (fix mode) so CodeLoop launches the app and runs the full visual verification.");
125
+ return lines.join("\n");
126
+ }
127
+ //# sourceMappingURL=cli_auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli_auth.js","sourceRoot":"","sources":["../../src/runners/cli_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;GAGG;AACH,MAAM,SAAS,GAAc;IAC3B;QACE,GA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ACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,4GAA4G,CAAC,CAAC;IACzH,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,aAAa,6BAA6B,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,0HAA0H;QACxH,+GAA+G,CAClH,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * journey_to_maestro — translate a planned UserJourney into the string-step
3
+ * format that maestro_generator.stepToYaml understands, so codeloop_run_journey
4
+ * can DRIVE a real, label-based interaction suite on a booted iOS simulator /
5
+ * Android emulator (type into named fields, tap buttons by label, submit,
6
+ * assert), instead of degrading every mobile step to a manual follow-up because
7
+ * the coordinate-only engine has no widget targeting.
8
+ *
9
+ * Pure + unit-testable: takes a UserJourneyPlan, returns string steps. The
10
+ * orchestrator feeds those to generateMaestroFlow() and runs them via Maestro.
11
+ *
12
+ * Best-effort by design: Maestro matches by visible text / accessibility label,
13
+ * so a `tap "<label>"` only lands if that text is actually on screen. When a
14
+ * step can't be expressed as a label action it is simply omitted (the journey's
15
+ * coordinate fallback + screenshots still cover it), never invented.
16
+ */
17
+ import type { UserJourneyPlan } from "../tools/plan_user_journey.js";
18
+ export interface JourneyToMaestroOptions {
19
+ /** Cap how many entity arcs to include (keeps flows bounded). Default 3. */
20
+ maxEntities?: number;
21
+ /** Emit a `take screenshot` after each meaningful step. Default true. */
22
+ screenshots?: boolean;
23
+ /** Seconds to wait for an AI reply before screenshotting. Default 5. */
24
+ aiWaitSeconds?: number;
25
+ }
26
+ /**
27
+ * PURE: build the ordered list of Maestro string-steps for a journey plan.
28
+ * Order: a leading screenshot, then top entity CRUD arcs, then AI chatbox arcs.
29
+ */
30
+ export declare function journeyToMaestroSteps(plan: UserJourneyPlan, opts?: JourneyToMaestroOptions): string[];
31
+ //# sourceMappingURL=journey_to_maestro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journey_to_maestro.d.ts","sourceRoot":"","sources":["../../src/runners/journey_to_maestro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,+BAA+B,CAAC;AAElF,MAAM,WAAW,uBAAuB;IACtC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2DD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE,uBAA4B,GACjC,MAAM,EAAE,CAkCV"}