@muggleai/works 5.26.0-staging.217 → 5.26.0-staging.219
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/.claude-plugin/marketplace.json +1 -1
- package/README.md +2 -0
- package/dist/{chunk-FP5PRYGP.js → chunk-45WV6RS5.js} +188 -3
- package/dist/{chunk-MJ34HBWC.js → chunk-NFS44KNQ.js} +564 -326
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-mcp.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/.mcp.json +1 -1
- package/dist/plugin/skills/_shared/dev-loop/failures.md +1 -1
- package/dist/plugin/skills/_shared/dev-loop/run.md +16 -4
- package/dist/plugin/skills/do/e2e-acceptance.md +9 -1
- package/dist/plugin/skills/do/e2e-repair.md +2 -0
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +4 -2
- package/dist/plugin/skills/muggle-preferences/SKILL.md +1 -0
- package/dist/plugin/skills/muggle-preferences/ops/list.md +1 -0
- package/dist/plugin/skills/muggle-preferences/ops/llm-source.md +28 -0
- package/dist/plugin/skills/muggle-preferences/ops/onboard.md +4 -0
- package/dist/plugin/skills/muggle-test/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-test/execute-local.md +4 -2
- package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
- package/dist/release-manifest.json +3 -3
- package/dist/src-HALLVP7O.js +1 -0
- package/package.json +10 -10
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-mcp.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/skills/_shared/dev-loop/failures.md +1 -1
- package/plugin/skills/_shared/dev-loop/run.md +16 -4
- package/plugin/skills/do/e2e-acceptance.md +9 -1
- package/plugin/skills/do/e2e-repair.md +2 -0
- package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +4 -2
- package/plugin/skills/muggle-preferences/SKILL.md +1 -0
- package/plugin/skills/muggle-preferences/ops/list.md +1 -0
- package/plugin/skills/muggle-preferences/ops/llm-source.md +28 -0
- package/plugin/skills/muggle-preferences/ops/onboard.md +4 -0
- package/plugin/skills/muggle-test/SKILL.md +1 -1
- package/plugin/skills/muggle-test/execute-local.md +4 -2
- package/plugin/skills/muggle-test-feature-local/SKILL.md +3 -1
- package/dist/src-B7WALKBP.js +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# LLM source
|
|
2
|
+
|
|
3
|
+
Who supplies the model for tests Studio runs on this computer: Muggle AI credit (default), the user's own Anthropic API key, or a local / self-hosted model. Cloud runs always use Muggle AI credit.
|
|
4
|
+
|
|
5
|
+
The CLI owns the options, labels, and storage. Render what `muggle llm-source --json` returns — never hardcode labels, and never write `preferences.json` or the credentials file directly.
|
|
6
|
+
|
|
7
|
+
**Never collect an API key in chat.** A key typed here lands in the conversation transcript. The key is accepted only at the CLI's hidden terminal prompt.
|
|
8
|
+
|
|
9
|
+
## Step 1 — load the question
|
|
10
|
+
|
|
11
|
+
Run `muggle llm-source --json`. It returns `header`, `prompt`, `scopeNote`, `options` (each `source`, `label`, `description`), and `current` (the source in effect; any key is already masked).
|
|
12
|
+
|
|
13
|
+
## Step 2 — ask
|
|
14
|
+
|
|
15
|
+
One `AskUserQuestion`: `header` = `header`, question text = `prompt` followed by `scopeNote`, one option per entry in `options` using `label` and `description`. Pre-select the option whose `source` equals `current.source`.
|
|
16
|
+
|
|
17
|
+
## Step 3 — apply
|
|
18
|
+
|
|
19
|
+
| Picked `source` | Do |
|
|
20
|
+
| :-------------- | :- |
|
|
21
|
+
| `current.source` again | Nothing to change. Say which source stays in effect. |
|
|
22
|
+
| `muggle-credit` | `muggle llm-source --use muggle-credit` |
|
|
23
|
+
| `local-model` | Ask in chat for the endpoint URL and the vision-capable model name (neither is secret), then `muggle llm-source --use local-model --base-url <url> --model <name>`. If the endpoint needs its own key, tell the user to run `muggle llm-source` in a terminal instead. |
|
|
24
|
+
| `anthropic-api-key` | Do not run anything. Tell the user to run `muggle llm-source` in their own terminal and paste the key at the hidden prompt. |
|
|
25
|
+
|
|
26
|
+
## Step 4 — confirm
|
|
27
|
+
|
|
28
|
+
Print the line the CLI reported. To show the source later: `muggle llm-source --show`.
|
|
@@ -52,3 +52,7 @@ Run `muggle init --apply ~/.muggle-ai/temp/onboarding-answers.json`, then delete
|
|
|
52
52
|
## Step 6 — confirm
|
|
53
53
|
|
|
54
54
|
Print what the CLI reported. On `skip`, say it will be offered again next session and move on — a declined offer retires itself after the third time.
|
|
55
|
+
|
|
56
|
+
## Step 7 — LLM source
|
|
57
|
+
|
|
58
|
+
Unless the user picked `skip`, run [`llm-source.md`](llm-source.md) — who supplies the model for local runs.
|
|
@@ -265,7 +265,7 @@ Run the path matching the mode confirmed in Step 1. Each path owns its own proce
|
|
|
265
265
|
|
|
266
266
|
## Step 7C: Route every failed run through the debug path
|
|
267
267
|
|
|
268
|
-
For every run with `status: "failed"` (or any non-passing terminal state) returned by Step 7 (either path), route through [`_shared/debug-failed-run.md`](../_shared/debug-failed-run.md). This is **mandatory** — a failure is never reported without it. The debug path gathers evidence (attempted steps + reasoning + screenshot), diagnoses via [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md) (§B replay / §C regen), shows the debug card, and presents the guaranteed selection in which **"give feedback & rerun"** is always an option and "skip" is never the default.
|
|
268
|
+
For every run with `status: "failed"` (or any non-passing terminal state; a local record `skipped` because its primary failed is not a run) returned by Step 7 (either path), route through [`_shared/debug-failed-run.md`](../_shared/debug-failed-run.md). This is **mandatory** — a failure is never reported without it. The debug path gathers evidence (attempted steps + reasoning + screenshot), diagnoses via [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md) (§B replay / §C regen), shows the debug card, and presents the guaranteed selection in which **"give feedback & rerun"** is always an option and "skip" is never the default.
|
|
269
269
|
|
|
270
270
|
Pass it per failed run: the `runId` (local) or workflow runtime id (remote), the `mode` that failed, `testCaseId`, `projectId`, and the execution handle (local: [`execute-local.md`](execute-local.md); remote: [`execute-remote.md`](execute-remote.md)) so a rerun re-enters the same path. Process failures one at a time so the user isn't drowning in pickers.
|
|
271
271
|
|
|
@@ -36,7 +36,7 @@ Before the first run, resolve each selected test case's prerequisite chain and m
|
|
|
36
36
|
|
|
37
37
|
## Run the dev loop
|
|
38
38
|
|
|
39
|
-
Execute each test case via the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [sequential replay/regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`freshSession`](../_shared/dev-loop/fresh-session.md), and [`timeoutMs`](../_shared/dev-loop/timeouts.md).
|
|
39
|
+
Execute each test case via the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [one run per record](../_shared/dev-loop/run.md#records), [sequential replay/regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`freshSession`](../_shared/dev-loop/fresh-session.md), and [`timeoutMs`](../_shared/dev-loop/timeouts.md).
|
|
40
40
|
|
|
41
41
|
Caller glue:
|
|
42
42
|
- `mode` per test case is the input from the router; `localUrl` from the pre-flight question; `showUi` from the `showElectronBrowser` resolution.
|
|
@@ -59,8 +59,10 @@ Checkout flow FAILED 15.7s 12 <viewUrl>
|
|
|
59
59
|
Total: 3 tests | 2 passed | 1 failed | 37.1s
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
A test case with records gets one row per record, named `<title> (<resolutionLabel>)`; a record skipped because its primary failed shows `SKIPPED`.
|
|
63
|
+
|
|
62
64
|
For failures, don't hand-write a verdict — the router routes each through the debug path.
|
|
63
65
|
|
|
64
66
|
## Output
|
|
65
67
|
|
|
66
|
-
Return the uniform runs list the router consumes: `[{ testCaseId, mode, runId, status, viewUrl?, cloudTestScriptId?, cloudActionScriptId? }]`. The studio published each run during execution, so `viewUrl` / `cloudTestScriptId` / `cloudActionScriptId` come straight off the run result (`muggle-local-run-result-get`).
|
|
68
|
+
Return the uniform runs list the router consumes: `[{ testCaseId, mode, runId, status, viewUrl?, cloudTestScriptId?, cloudActionScriptId?, runSettingsId?, resolutionLabel? }]`. The studio published each run during execution, so `viewUrl` / `cloudTestScriptId` / `cloudActionScriptId` / `runSettingsId` (its `cloudRunSettingsId`) come straight off the run result (`muggle-local-run-result-get`). A record skipped because its primary failed is an entry `{ testCaseId, status: "skipped", reason: "primary failed", runSettingsId, resolutionLabel }` with no `runId`: it is not a failed run and skips the debug path.
|
|
@@ -142,9 +142,11 @@ Before deciding the target's script, resolve its prerequisite chain from the bac
|
|
|
142
142
|
- **If any replayable/succeeded scripts exist:** use `AskUserQuestion` to present them as clickable options. Show: name, created/updated, step count per option. Include **"Generate new script"** as the last option.
|
|
143
143
|
- **If none:** go straight to generation (no need to ask replay vs generate).
|
|
144
144
|
|
|
145
|
+
A test case whose local lane has records runs once per record ([`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md#records)), so the pick sets only the mode: a script means replay, which replays each record's own script, and "Generate new script" means regen.
|
|
146
|
+
|
|
145
147
|
### 6. Load data for the chosen path
|
|
146
148
|
|
|
147
|
-
Run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [`freshSession`](../_shared/dev-loop/fresh-session.md), [replay vs regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`timeoutMs`](../_shared/dev-loop/timeouts.md), and [failure interpretation](../_shared/dev-loop/failures.md).
|
|
149
|
+
Run the shared loop in [`../_shared/dev-loop/run.md`](../_shared/dev-loop/run.md): [one run per record](../_shared/dev-loop/run.md#records), [`freshSession`](../_shared/dev-loop/fresh-session.md), [replay vs regen](../_shared/dev-loop/run.md), [`actionScript` as-is](../_shared/dev-loop/action-script.md), [`timeoutMs`](../_shared/dev-loop/timeouts.md), and [failure interpretation](../_shared/dev-loop/failures.md).
|
|
148
150
|
|
|
149
151
|
Caller glue: `mode` is the path chosen in §5; `localUrl` from §4; `cwd` = the repo root, or the prepared worktree when one is in use.
|
|
150
152
|
|
package/dist/src-B7WALKBP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackRelease, decideStackRenewal, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-MJ34HBWC.js';
|