@muggleai/works 5.19.0-staging.131 → 5.19.0-staging.132
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/README.md +11 -5
- package/dist/{chunk-ODEPI25T.js → chunk-H2KMRAQZ.js} +38 -6
- package/dist/{chunk-U6ZACW6K.js → chunk-ZA5KHVX5.js} +1500 -1255
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/skills/_shared/debug-failed-run.md +5 -3
- package/dist/plugin/skills/_shared/dev-loop/action-script.md +2 -0
- package/dist/plugin/skills/_shared/dev-loop/failures.md +3 -1
- package/dist/plugin/skills/_shared/failure-mode-handling.md +5 -4
- package/dist/plugin/skills/do/e2e-repair.md +3 -1
- package/dist/plugin/skills/muggle-feedback/ops/submit.md +2 -0
- package/dist/plugin/skills/muggle-test/reference.md +1 -0
- package/dist/release-manifest.json +3 -3
- package/dist/src-RU5QOCXE.js +1 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/skills/_shared/debug-failed-run.md +5 -3
- package/plugin/skills/_shared/dev-loop/action-script.md +2 -0
- package/plugin/skills/_shared/dev-loop/failures.md +3 -1
- package/plugin/skills/_shared/failure-mode-handling.md +5 -4
- package/plugin/skills/do/e2e-repair.md +3 -1
- package/plugin/skills/muggle-feedback/ops/submit.md +2 -0
- package/plugin/skills/muggle-test/reference.md +1 -0
- package/dist/src-C2IZ3MAZ.js +0 -1
package/README.md
CHANGED
|
@@ -247,11 +247,11 @@ so the result carries a viewUrl straight to the dashboard
|
|
|
247
247
|
├── oauth-session.json # OAuth tokens (short-lived, auto-refresh)
|
|
248
248
|
├── api-key.json # Long-lived key for service calls
|
|
249
249
|
├── projects/ # Local project cache
|
|
250
|
-
├── sessions/ # Run sessions
|
|
250
|
+
├── sessions/ # Run sessions — read one with `muggle run-view [runId]`
|
|
251
251
|
│ └── {runId}/
|
|
252
|
-
│ ├── action-script.json
|
|
253
|
-
│ ├── results.md
|
|
254
|
-
│ └──
|
|
252
|
+
│ ├── action-script.json # Recorded browser steps
|
|
253
|
+
│ ├── results.md # Step-by-step report
|
|
254
|
+
│ └── electron-runtime/screenshot/ # Per-step images
|
|
255
255
|
├── muggle-do/sessions/ # Cycle state, iterations, PR watchers
|
|
256
256
|
└── electron-app/{version}/
|
|
257
257
|
```
|
|
@@ -260,7 +260,7 @@ so the result carries a viewUrl straight to the dashboard
|
|
|
260
260
|
|
|
261
261
|
## MCP tool reference
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
108 tools across authentication, projects, use cases, test cases, scripts, workflows, local execution, reporting, secrets, billing, and administration. Call them directly from any MCP client to build your own pipeline.
|
|
264
264
|
|
|
265
265
|
**Authentication** — `muggle-remote-auth-status`, `-login`, `-poll`, `-logout`, plus `-api-key-create`, `-list`, `-get`, `-revoke`.
|
|
266
266
|
|
|
@@ -308,6 +308,7 @@ Bulk-preview submissions return a `jobId` immediately. Poll `muggle-remote-bulk-
|
|
|
308
308
|
| `muggle-local-execute-replay` | Replay an existing script |
|
|
309
309
|
| `muggle-local-cancel-execution` | Cancel the active run |
|
|
310
310
|
| `muggle-local-run-result-list` / `-get` | Results, screenshots, and cloud refs (`viewUrl`) |
|
|
311
|
+
| `muggle-local-run-steps-get` | A run's ordered steps beside the frame each produced |
|
|
311
312
|
| `muggle-local-test-script-list` / `-get` | Read locally cached scripts |
|
|
312
313
|
| `muggle-local-last-host-*` / `-last-project-*` | Remember the host and project between runs |
|
|
313
314
|
| `muggle-local-preferences-set` | Set harness preferences |
|
|
@@ -335,6 +336,11 @@ muggle versions # List installed runner versions
|
|
|
335
336
|
muggle cleanup [--dry-run] # Remove old versions and obsolete skills
|
|
336
337
|
muggle doctor # Diagnose installation problems
|
|
337
338
|
|
|
339
|
+
# Inspecting runs
|
|
340
|
+
muggle run-view [runId] # A run's steps beside the frames they produced (newest run by default)
|
|
341
|
+
muggle run-view --html # Render those frames as a self-contained page
|
|
342
|
+
muggle run-view --open # Render it and open it in the browser
|
|
343
|
+
|
|
338
344
|
# Authentication
|
|
339
345
|
muggle login [--key-expiry 90d]
|
|
340
346
|
muggle logout
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, toolRequiresAuth, getCallerCredentials, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, OnboardingBlanketChoice, PreferenceKey } from './chunk-
|
|
1
|
+
import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, toolRequiresAuth, getCallerCredentials, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, OnboardingBlanketChoice, PreferenceKey } from './chunk-ZA5KHVX5.js';
|
|
2
2
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
3
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
@@ -8,7 +8,7 @@ import * as fs from 'fs';
|
|
|
8
8
|
import { readFileSync, existsSync, rmSync, mkdirSync, readdirSync, createWriteStream, writeFileSync, statSync } from 'fs';
|
|
9
9
|
import * as path from 'path';
|
|
10
10
|
import { dirname, resolve, join } from 'path';
|
|
11
|
-
import { fileURLToPath } from 'url';
|
|
11
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
12
12
|
import { Command } from 'commander';
|
|
13
13
|
import axios from 'axios';
|
|
14
14
|
import { platform, homedir, arch } from 'os';
|
|
@@ -754,7 +754,7 @@ async function resolveGsScreenshotUrls(report, opts) {
|
|
|
754
754
|
if (gsUrls.length === 0) {
|
|
755
755
|
return report;
|
|
756
756
|
}
|
|
757
|
-
const mcps = await import('./src-
|
|
757
|
+
const mcps = await import('./src-RU5QOCXE.js');
|
|
758
758
|
const credentials = await mcps.getCallerCredentialsAsync();
|
|
759
759
|
if (!credentials.bearerToken && !credentials.apiKey) {
|
|
760
760
|
stderrWrite(
|
|
@@ -807,7 +807,7 @@ var withSentinel = (s) => s ? `${REPORT_SECTION_SENTINEL}
|
|
|
807
807
|
${s}` : s;
|
|
808
808
|
async function resolveDashboardBaseUrl(stderrWrite) {
|
|
809
809
|
try {
|
|
810
|
-
const mcps = await import('./src-
|
|
810
|
+
const mcps = await import('./src-RU5QOCXE.js');
|
|
811
811
|
return mcps.resolveActiveProfile().dashboardBaseUrl;
|
|
812
812
|
} catch (err) {
|
|
813
813
|
stderrWrite(
|
|
@@ -1619,6 +1619,10 @@ function getHelpGuidance() {
|
|
|
1619
1619
|
` ${cmd("muggle upgrade")} Check for updates`,
|
|
1620
1620
|
` ${cmd("muggle upgrade --check")} Check updates without installing`,
|
|
1621
1621
|
"",
|
|
1622
|
+
` ${colorize("Inspecting Runs:", COLORS.bold)}`,
|
|
1623
|
+
` ${cmd("muggle run-view")} Show a run's steps beside the frames they produced`,
|
|
1624
|
+
` ${cmd("muggle run-view --html")} Render those frames as a self-contained page`,
|
|
1625
|
+
"",
|
|
1622
1626
|
` ${colorize("Authentication:", COLORS.bold)}`,
|
|
1623
1627
|
` ${cmd("muggle login")} Login to Muggle AI`,
|
|
1624
1628
|
` ${cmd("muggle logout")} Clear stored credentials`,
|
|
@@ -1654,7 +1658,7 @@ function getHelpGuidance() {
|
|
|
1654
1658
|
"",
|
|
1655
1659
|
` ${colorize("Local E2E tools:", COLORS.bold)} (prefix: muggle-local-)`,
|
|
1656
1660
|
" muggle-local-execute-test-generation, muggle-local-execute-replay,",
|
|
1657
|
-
" muggle-local-run-result-get, muggle-local-check-status, etc.",
|
|
1661
|
+
" muggle-local-run-result-get, muggle-local-run-steps-get, muggle-local-check-status, etc.",
|
|
1658
1662
|
"",
|
|
1659
1663
|
header("Data Directory"),
|
|
1660
1664
|
"",
|
|
@@ -1662,7 +1666,7 @@ function getHelpGuidance() {
|
|
|
1662
1666
|
"",
|
|
1663
1667
|
` ${path3("api-key.json")} Long-lived API key (auto-generated)`,
|
|
1664
1668
|
` ${path3("projects/")} Local test projects`,
|
|
1665
|
-
` ${path3("sessions/")} Test execution sessions`,
|
|
1669
|
+
` ${path3("sessions/")} Test execution sessions (read one with ${cmd("muggle run-view")})`,
|
|
1666
1670
|
` ${path3("electron-app/")} Downloaded Electron app binaries`,
|
|
1667
1671
|
"",
|
|
1668
1672
|
header("Troubleshooting"),
|
|
@@ -2132,6 +2136,33 @@ async function prWalkthroughCheckCommand(flags) {
|
|
|
2132
2136
|
`);
|
|
2133
2137
|
process.exitCode = judgment.exitCode;
|
|
2134
2138
|
}
|
|
2139
|
+
async function runViewCommand(runId, options = {}) {
|
|
2140
|
+
let runView;
|
|
2141
|
+
try {
|
|
2142
|
+
runView = readRunView(runId);
|
|
2143
|
+
} catch (error) {
|
|
2144
|
+
if (error instanceof RunViewError) {
|
|
2145
|
+
console.error(error.message);
|
|
2146
|
+
process.exitCode = 1;
|
|
2147
|
+
return;
|
|
2148
|
+
}
|
|
2149
|
+
throw error;
|
|
2150
|
+
}
|
|
2151
|
+
if (!options.html && !options.open) {
|
|
2152
|
+
console.log(renderRunViewText(runView, { includeHtmlOffer: true }));
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
const htmlPath = writeRunViewHtml(runView, options.outDir);
|
|
2156
|
+
console.log(renderRunViewText(runView, { includeHtmlOffer: false }));
|
|
2157
|
+
console.log(`
|
|
2158
|
+
Wrote ${htmlPath}`);
|
|
2159
|
+
if (options.open) {
|
|
2160
|
+
const opened = await openBrowserUrl({ url: pathToFileURL(htmlPath).href });
|
|
2161
|
+
if (!opened.opened) {
|
|
2162
|
+
console.log("Could not open a browser automatically \u2014 open the file above.");
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2135
2166
|
|
|
2136
2167
|
// src/cli/disclosure/disclosure-constants.ts
|
|
2137
2168
|
var DISCLOSURE_OPT_OUT_MARKER = "To opt out,";
|
|
@@ -2918,6 +2949,7 @@ function createProgram() {
|
|
|
2918
2949
|
program.command("logout").description("Clear stored credentials").action(logoutCommand);
|
|
2919
2950
|
program.command("status").description("Show authentication status").action(statusCommand);
|
|
2920
2951
|
program.command("build-pr-section").description("Render a muggle-do PR body evidence block from an e2e report on stdin").option("--max-body-bytes <n>", "Max UTF-8 byte budget for the PR body (default 60000)").action(buildPrSectionCommand);
|
|
2952
|
+
program.command("run-view").argument("[runId]", "Run id, or a unique prefix of one (default: the newest run)").description("Show a local run's steps beside the frames they produced").option("--html", "Render a self-contained HTML page instead of terminal text").option("--open", "Open the rendered page in the default browser (implies --html)").option("--out-dir <dir>", "Directory to write the page into (default: current directory)").action(runViewCommand);
|
|
2921
2953
|
program.command("pr-walkthrough-check").description("Check that a PR's Muggle AI walkthrough comment carries a result or a stated skip").option("--repo <owner/repo>", "Repository (default: $GITHUB_REPOSITORY)").option("--pr <number>", "Pull request number (default: the Actions event payload)").option("--head-sha <sha>", "Commit the check run attaches to (default: the PR head)").option("--check-run", "Publish the verdict as a check run instead of failing the process").action(prWalkthroughCheckCommand);
|
|
2922
2954
|
program.command("ci-install").description("Add the Muggle walkthrough check to this repository's GitHub Actions").option("--force", "Replace an existing workflow file").action(ciInstallCommand);
|
|
2923
2955
|
program.action(() => {
|