@muggleai/works 5.35.0-staging.328 → 5.35.0-staging.330
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/dist/{chunk-JK62L5EO.js → chunk-3MGYJFPU.js} +12 -6
- package/dist/{chunk-XQQ2VU45.js → chunk-4TPA2XBD.js} +2 -2
- 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/scripts/guardrail-build-router.sh +34 -7
- package/dist/plugin/scripts/guardrail-capability-claim.sh +21 -9
- package/dist/plugin/scripts/guardrail-classify-gate.sh +1 -1
- package/dist/plugin/scripts/guardrail-pr-opened.sh +1 -1
- package/dist/plugin/scripts/guardrail-pr-terminal.sh +14 -0
- package/dist/plugin/scripts/guardrail-record-comment-replies.sh +1 -1
- package/dist/plugin/scripts/guardrail-record-delegation.sh +1 -1
- package/dist/plugin/scripts/guardrail-record-stage-signals.sh +1 -1
- package/dist/plugin/scripts/guardrail-report-format.sh +1 -1
- package/dist/plugin/scripts/guardrail-resolve-gate.sh +1 -1
- package/dist/plugin/scripts/guardrail-walkthrough-heading.sh +1 -1
- package/dist/plugin/scripts/guardrail-walkthrough-progress.sh +1 -1
- package/dist/plugin/scripts/guardrail-walkthrough-rerun.sh +1 -1
- package/dist/plugin/skills/_shared/dev-loop/run.md +1 -1
- package/dist/release-manifest.json +4 -4
- package/dist/{src-CTTMRHCL.js → src-BHOSJEAJ.js} +1 -1
- 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/scripts/guardrail-build-router.sh +34 -7
- package/plugin/scripts/guardrail-capability-claim.sh +21 -9
- package/plugin/scripts/guardrail-classify-gate.sh +1 -1
- package/plugin/scripts/guardrail-pr-opened.sh +1 -1
- package/plugin/scripts/guardrail-pr-terminal.sh +14 -0
- package/plugin/scripts/guardrail-record-comment-replies.sh +1 -1
- package/plugin/scripts/guardrail-record-delegation.sh +1 -1
- package/plugin/scripts/guardrail-record-stage-signals.sh +1 -1
- package/plugin/scripts/guardrail-report-format.sh +1 -1
- package/plugin/scripts/guardrail-resolve-gate.sh +1 -1
- package/plugin/scripts/guardrail-walkthrough-heading.sh +1 -1
- package/plugin/scripts/guardrail-walkthrough-progress.sh +1 -1
- package/plugin/scripts/guardrail-walkthrough-rerun.sh +1 -1
- package/plugin/skills/_shared/dev-loop/run.md +1 -1
|
@@ -6512,12 +6512,18 @@ var PinnedAccountSchema = z.object({
|
|
|
6512
6512
|
});
|
|
6513
6513
|
|
|
6514
6514
|
// packages/mcps/src/shared/llm-tier-constants.ts
|
|
6515
|
-
var WORKFLOW_LLM_PARAMS_DESCRIPTION = "Set tier to 'light' to run Studio in Light mode \u2014 a faster, lower-cost model (Claude Sonnet 5.5). Omit to inherit the project/use case/test case setting.";
|
|
6516
|
-
var LIGHT_MODE_INPUT_DESCRIPTION = "Run Studio in Light mode \u2014 faster, lower-cost model (Claude Sonnet 5.5). Default false.";
|
|
6517
6515
|
var LLM_TIER_DISPLAY_LABELS = {
|
|
6518
|
-
["standard" /* Standard */]: "
|
|
6519
|
-
["light" /* Light */]: "
|
|
6516
|
+
["standard" /* Standard */]: "Premium",
|
|
6517
|
+
["light" /* Light */]: "Standard"
|
|
6520
6518
|
};
|
|
6519
|
+
var LLM_TIER_MODEL_NAMES = {
|
|
6520
|
+
["standard" /* Standard */]: "Claude Opus 5.5",
|
|
6521
|
+
["light" /* Light */]: "Claude Sonnet 5.5"
|
|
6522
|
+
};
|
|
6523
|
+
var LIGHT_TIER_SUMMARY = `the ${LLM_TIER_DISPLAY_LABELS["light" /* Light */]} tier (${LLM_TIER_MODEL_NAMES["light" /* Light */]}, faster and lower cost)`;
|
|
6524
|
+
var DEFAULT_TIER_SUMMARY = `the ${LLM_TIER_DISPLAY_LABELS["standard" /* Standard */]} tier (${LLM_TIER_MODEL_NAMES["standard" /* Standard */]}, the default)`;
|
|
6525
|
+
var WORKFLOW_LLM_PARAMS_DESCRIPTION = `Model tier override. tier '${"light" /* Light */}' runs ${LIGHT_TIER_SUMMARY}; tier '${"standard" /* Standard */}' runs ${DEFAULT_TIER_SUMMARY}. Omit to inherit the project/use case/test case setting.`;
|
|
6526
|
+
var LIGHT_MODE_INPUT_DESCRIPTION = `true runs ${LIGHT_TIER_SUMMARY}. Default false runs ${DEFAULT_TIER_SUMMARY}.`;
|
|
6521
6527
|
|
|
6522
6528
|
// packages/mcps/src/shared/workflow-max-run-time-constants.ts
|
|
6523
6529
|
var MIN_WORKFLOW_MAX_RUN_TIME_OVERRIDE_MS = 60 * 1e3;
|
|
@@ -10324,7 +10330,7 @@ var ExecuteTestGenerationInputSchema = z.object({
|
|
|
10324
10330
|
runSettingsId: z.string().optional().describe(
|
|
10325
10331
|
"Local runSettings record to record this run against, e.g. a local script's runSettingsId. Pass its resolution as displayResolution."
|
|
10326
10332
|
),
|
|
10327
|
-
/** Run Studio's prediction agent on the
|
|
10333
|
+
/** Run Studio's prediction agent on the light tier. */
|
|
10328
10334
|
lightMode: z.boolean().optional().describe(LIGHT_MODE_INPUT_DESCRIPTION)
|
|
10329
10335
|
});
|
|
10330
10336
|
var ExecuteReplayInputSchema = z.object({
|
|
@@ -10354,7 +10360,7 @@ var ExecuteReplayInputSchema = z.object({
|
|
|
10354
10360
|
displayResolution: DisplayResolutionSchema.optional().describe(
|
|
10355
10361
|
"Browser resolution, e.g. R_0390x0844. Defaults to the script's recorded size."
|
|
10356
10362
|
),
|
|
10357
|
-
/** Run Studio's prediction agent on the
|
|
10363
|
+
/** Run Studio's prediction agent on the light tier. */
|
|
10358
10364
|
lightMode: z.boolean().optional().describe(LIGHT_MODE_INPUT_DESCRIPTION)
|
|
10359
10365
|
});
|
|
10360
10366
|
var CancelExecutionInputSchema = z.object({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, e2e_exports, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-
|
|
1
|
+
import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, e2e_exports, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-3MGYJFPU.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';
|
|
@@ -1341,7 +1341,7 @@ async function resolveGsScreenshotUrls(report, opts) {
|
|
|
1341
1341
|
if (gsUrls.length === 0) {
|
|
1342
1342
|
return report;
|
|
1343
1343
|
}
|
|
1344
|
-
const mcps = await import('./src-
|
|
1344
|
+
const mcps = await import('./src-BHOSJEAJ.js');
|
|
1345
1345
|
const credentials = await mcps.getCallerCredentialsAsync();
|
|
1346
1346
|
if (!credentials.bearerToken && !credentials.apiKey) {
|
|
1347
1347
|
stderrWrite(
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
2
|
-
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-4TPA2XBD.js';
|
|
2
|
+
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-3MGYJFPU.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
4
|
-
"version": "5.35.0-staging.
|
|
4
|
+
"version": "5.35.0-staging.330",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
5
|
-
"version": "5.35.0-staging.
|
|
5
|
+
"version": "5.35.0-staging.330",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/dist/plugin/.mcp.json
CHANGED
|
@@ -21,6 +21,13 @@ set -uo pipefail
|
|
|
21
21
|
# never fire again, so its state flag ends the check in-shell. detectBuildIntent
|
|
22
22
|
# drops a question or a slash command whatever verbs it holds, so those end here
|
|
23
23
|
# too, except a /muggle-do or /mdo command, which Node must see to arm the gate.
|
|
24
|
+
#
|
|
25
|
+
# A pasted log makes the prompt hundreds of KB, and capturing it with a regex costs
|
|
26
|
+
# about 1.5 ms per KB, so the prompt is never extracted. The payload is cut at its
|
|
27
|
+
# "prompt" key, which a string value cannot spell unescaped, and the question and
|
|
28
|
+
# slash checks read only the head of what follows while the verbs are glob
|
|
29
|
+
# substring tests, several times cheaper than one alternation regex. Whatever
|
|
30
|
+
# follows the prompt in the payload is searched too, which only over-matches.
|
|
24
31
|
|
|
25
32
|
guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
26
33
|
[[ $guardrail_script_dir == "${BASH_SOURCE[0]}" ]] && guardrail_script_dir=.
|
|
@@ -28,27 +35,47 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
28
35
|
|
|
29
36
|
GUARDRAIL_SUBCOMMAND="build-router"
|
|
30
37
|
|
|
38
|
+
# Matched case-insensitively as substrings, so "muggle-do" and "mdo" cover every
|
|
39
|
+
# /muggle-do, /muggle:mdo and $mdo spelling.
|
|
40
|
+
BUILD_ROUTER_WORDS=(implement build add create write fix refactor "wire up" "hook up" make "change the" conflict merged passing green muggle-do mdo)
|
|
41
|
+
|
|
31
42
|
guardrail_wants() {
|
|
32
43
|
if guardrail_load_state && guardrail_state_has '"buildIntentRouted": true'; then
|
|
33
44
|
return 1
|
|
34
45
|
fi
|
|
35
|
-
|
|
46
|
+
local prompt_key='"prompt"'
|
|
47
|
+
[[ $GUARDRAIL_PAYLOAD == *"$prompt_key"* ]] || return 1
|
|
48
|
+
local prompt_onward="${GUARDRAIL_PAYLOAD#*"$prompt_key"}"
|
|
49
|
+
local value_opening_pattern='^[[:space:]]*:[[:space:]]*"'
|
|
50
|
+
[[ ${prompt_onward:0:64} =~ $value_opening_pattern ]] || return 1
|
|
51
|
+
prompt_onward="${prompt_onward:${#BASH_REMATCH[0]}}"
|
|
52
|
+
local prompt_head="${prompt_onward:0:256}"
|
|
36
53
|
# The prompt is still JSON-escaped: an escaped newline, return or tab counts as leading
|
|
37
|
-
# space, and any other escape leaves the prompt to Node.
|
|
54
|
+
# space, and any other escape leaves the prompt to Node. The value's closing quote ends
|
|
55
|
+
# a command name the way the end of the prompt does.
|
|
38
56
|
local leading_space='^([[:space:]]|\\[nrt])*'
|
|
39
57
|
local question_pattern="$leading_space"'(why|what|how|when|where|who|is|are|does|do|can you (explain|tell)|explain)([^A-Za-z0-9_]|$)'
|
|
40
58
|
local slash_command_pattern="$leading_space"'/'
|
|
41
|
-
local muggle_do_command_pattern="$leading_space"'/([A-Za-z0-9_-]+:)?(muggle-do|mdo)([[:space:]]
|
|
59
|
+
local muggle_do_command_pattern="$leading_space"'/([A-Za-z0-9_-]+:)?(muggle-do|mdo)([[:space:]]|\\|"|$)'
|
|
42
60
|
local is_rejected_by_node=1
|
|
43
61
|
shopt -s nocasematch
|
|
44
|
-
if [[ $
|
|
62
|
+
if [[ $prompt_head =~ $question_pattern ]]; then
|
|
45
63
|
is_rejected_by_node=0
|
|
46
|
-
elif [[ $
|
|
64
|
+
elif [[ $prompt_head =~ $slash_command_pattern && ! $prompt_head =~ $muggle_do_command_pattern ]]; then
|
|
47
65
|
is_rejected_by_node=0
|
|
48
66
|
fi
|
|
67
|
+
local is_build_word_found=1
|
|
68
|
+
if ((is_rejected_by_node == 1)); then
|
|
69
|
+
local build_word
|
|
70
|
+
for build_word in "${BUILD_ROUTER_WORDS[@]}"; do
|
|
71
|
+
if [[ $prompt_onward == *"$build_word"* ]]; then
|
|
72
|
+
is_build_word_found=0
|
|
73
|
+
break
|
|
74
|
+
fi
|
|
75
|
+
done
|
|
76
|
+
fi
|
|
49
77
|
shopt -u nocasematch
|
|
50
|
-
|
|
51
|
-
guardrail_fields_match prompt '(implement|build|add|create|write|fix|refactor|wire up|hook up|make|change the|conflict|merged|passing|green|[/$](muggle:)?(muggle-do|mdo))'
|
|
78
|
+
return "$is_build_word_found"
|
|
52
79
|
}
|
|
53
80
|
|
|
54
81
|
if guardrail_is_hook_script; then
|
|
@@ -10,8 +10,8 @@ set -uo pipefail
|
|
|
10
10
|
# it fires on EVERY turn end, so the pre-filter has to be cheap. The claim lives
|
|
11
11
|
# in the assistant's prose. A payload carrying the closing message
|
|
12
12
|
# (`last_assistant_message` — Codex always sends it, Claude Code may) is
|
|
13
|
-
# searched in-shell; otherwise the filter greps the transcript tail for
|
|
14
|
-
#
|
|
13
|
+
# searched in-shell; otherwise the filter greps the transcript tail for the
|
|
14
|
+
# detector's three word groups in-shell and spawns Node only on a hit. Node then applies
|
|
15
15
|
# the real per-sentence detector, which is what keeps a genuine SMS/TOTP limit
|
|
16
16
|
# from being "corrected". Over-matching here costs a needless spawn; it can
|
|
17
17
|
# never emit a spurious nudge. Degrades to {} so it never blocks on its own
|
|
@@ -23,14 +23,30 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
23
23
|
|
|
24
24
|
GUARDRAIL_SUBCOMMAND="capability-claim-gate"
|
|
25
25
|
|
|
26
|
+
# Whether the text holds all three word groups detectFalseCapabilityClaim needs in one sentence:
|
|
27
|
+
# an impossibility, a flow a managed profile clears, and a testing context. Each is a superset of
|
|
28
|
+
# its capabilityClaim.ts pattern, matched anywhere in the text, so it never drops a claim Node
|
|
29
|
+
# would catch. An impossibility word alone hits most turn ends, which say "can't" about anything.
|
|
30
|
+
# The apostrophe slot takes a curly quote as UTF-8 bytes or as the backslash-u2019 escape JSON may carry.
|
|
31
|
+
capability_claim_text_could_match() {
|
|
32
|
+
local text="$1"
|
|
33
|
+
local impossibility_pattern='can(.{1,3}|\\u2019)t|could ?n(.{1,3}|\\u2019)?t|unable to|no way to|not able to|untestable|unverifiable|not testable|impossible|infeasible|blocked from|no (local )?(mail|email|smtp) path'
|
|
34
|
+
local cleared_flow_pattern='link|otp|code|password|verif|2fa|factor|inbox|mail|smtp|captcha|log ?in|logged|sign|auth|credential|sms|text|totp'
|
|
35
|
+
local testing_context_pattern='e2e|end.to.end|test|verif|validat|automat|coverage|covered|exercis|reproduc|replay|script|muggle|playwright|cypress|selenium'
|
|
36
|
+
local matched=1
|
|
37
|
+
shopt -s nocasematch
|
|
38
|
+
[[ $text =~ $impossibility_pattern && $text =~ $cleared_flow_pattern && $text =~ $testing_context_pattern ]] && matched=0
|
|
39
|
+
shopt -u nocasematch
|
|
40
|
+
return "$matched"
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
guardrail_wants() {
|
|
27
44
|
if guardrail_load_state && guardrail_state_has '"capabilityClaimNudged": true'; then
|
|
28
45
|
return 1
|
|
29
46
|
fi
|
|
30
|
-
local claim_pattern='can.t|cannot|unable to|no way to|untestable|unverifiable|impossible|infeasible'
|
|
31
47
|
local closing_message_pattern='"last_assistant_message"[[:space:]]*:[[:space:]]*"'
|
|
32
48
|
if [[ $GUARDRAIL_PAYLOAD =~ $closing_message_pattern ]]; then
|
|
33
|
-
|
|
49
|
+
capability_claim_text_could_match "$GUARDRAIL_PAYLOAD"
|
|
34
50
|
return
|
|
35
51
|
fi
|
|
36
52
|
local transcript_pattern='"transcript_path"[[:space:]]*:[[:space:]]*"([^"]*)"'
|
|
@@ -42,11 +58,7 @@ guardrail_wants() {
|
|
|
42
58
|
# in-shell costs more than a tail. Gone for the session once the gate has nudged.
|
|
43
59
|
local transcript_tail
|
|
44
60
|
transcript_tail="$(tail -c 20000 "$transcript" 2>/dev/null)"
|
|
45
|
-
|
|
46
|
-
shopt -s nocasematch
|
|
47
|
-
[[ $transcript_tail =~ $claim_pattern ]] && matched=0
|
|
48
|
-
shopt -u nocasematch
|
|
49
|
-
return "$matched"
|
|
61
|
+
capability_claim_text_could_match "$transcript_tail"
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
if guardrail_is_hook_script; then
|
|
@@ -21,7 +21,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
21
21
|
GUARDRAIL_SUBCOMMAND="classify-gate"
|
|
22
22
|
|
|
23
23
|
guardrail_wants() {
|
|
24
|
-
|
|
24
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="pr-opened"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(create|ready)|glab[[:space:]]+mr[[:space:]]+(create|update)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -14,6 +14,12 @@ set -uo pipefail
|
|
|
14
14
|
# dropped it a close+reopen — routine, to re-fire a lost workflow trigger — left
|
|
15
15
|
# the handoff armed on a change that is open again. Degrades to {} so it never
|
|
16
16
|
# blocks.
|
|
17
|
+
#
|
|
18
|
+
# The output shapes are searched across the whole payload, which carries the
|
|
19
|
+
# command's full output, so the command is checked first: detectPrTerminal only
|
|
20
|
+
# reads the output of a merge, close or reopen, or of the watch scripts, and a
|
|
21
|
+
# payload with no command at all is left to it. Every other command ends here
|
|
22
|
+
# before its output is scanned.
|
|
17
23
|
|
|
18
24
|
guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
19
25
|
[[ $guardrail_script_dir == "${BASH_SOURCE[0]}" ]] && guardrail_script_dir=.
|
|
@@ -22,6 +28,14 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
22
28
|
GUARDRAIL_SUBCOMMAND="pr-terminal"
|
|
23
29
|
|
|
24
30
|
guardrail_wants() {
|
|
31
|
+
if guardrail_payload_field command; then
|
|
32
|
+
local terminal_command_pattern='(gh|glab)[[:space:]]+(pr|mr)[[:space:]]+(merge|close|reopen)|pr-watch-(loop|arm)\.sh'
|
|
33
|
+
local is_terminal_command=1
|
|
34
|
+
shopt -s nocasematch
|
|
35
|
+
[[ $GUARDRAIL_FIELD_VALUE =~ $terminal_command_pattern ]] && is_terminal_command=0
|
|
36
|
+
shopt -u nocasematch
|
|
37
|
+
((is_terminal_command == 0)) || return 1
|
|
38
|
+
fi
|
|
25
39
|
guardrail_payload_matches '(merged|closed|reopened) pull request|TERMINAL pr='
|
|
26
40
|
}
|
|
27
41
|
|
|
@@ -25,7 +25,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
25
25
|
GUARDRAIL_SUBCOMMAND="record-comment-replies"
|
|
26
26
|
|
|
27
27
|
guardrail_wants() {
|
|
28
|
-
|
|
28
|
+
guardrail_fields_match command 'reviewThreads|merge_requests/[0-9]+/discussions|comments/[0-9]+/replies|discussions/[A-Za-z0-9_-]+/notes|MUGGLE_[A-Z0-9_]+_SKIP'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if guardrail_is_hook_script; then
|
|
@@ -17,7 +17,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
17
17
|
GUARDRAIL_SUBCOMMAND="record-delegation"
|
|
18
18
|
|
|
19
19
|
guardrail_wants() {
|
|
20
|
-
|
|
20
|
+
guardrail_fields_match subagent_type 'acceptance-tester'
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if guardrail_is_hook_script; then
|
|
@@ -20,7 +20,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
20
20
|
GUARDRAIL_SUBCOMMAND="record-stage-signals"
|
|
21
21
|
|
|
22
22
|
guardrail_wants() {
|
|
23
|
-
|
|
23
|
+
guardrail_fields_match command tool_name 'MUGGLE_[A-Z0-9_]+_SKIP|muggle.*(telemetry[-_]event[-_]emit|user[-_]feedback[-_]create)'
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if guardrail_is_hook_script; then
|
|
@@ -24,7 +24,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
24
24
|
GUARDRAIL_SUBCOMMAND="report-gate"
|
|
25
25
|
|
|
26
26
|
guardrail_wants() {
|
|
27
|
-
|
|
27
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]'
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if guardrail_is_hook_script; then
|
|
@@ -19,7 +19,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
19
19
|
GUARDRAIL_SUBCOMMAND="resolve-gate"
|
|
20
20
|
|
|
21
21
|
guardrail_wants() {
|
|
22
|
-
|
|
22
|
+
guardrail_fields_match command 'resolveReviewThread|resolved=(true|false)'
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
if guardrail_is_hook_script; then
|
|
@@ -21,7 +21,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
21
21
|
GUARDRAIL_SUBCOMMAND="walkthrough-heading-gate"
|
|
22
22
|
|
|
23
23
|
guardrail_wants() {
|
|
24
|
-
|
|
24
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]'
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="walkthrough-progress-update"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="walkthrough-rerun-notice"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -14,7 +14,7 @@ The caller resolves these before the loop and supplies them per test case:
|
|
|
14
14
|
- `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
|
|
15
15
|
- `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
|
|
16
16
|
- `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
|
|
17
|
-
- `lightMode` — `true` only when the user asks for
|
|
17
|
+
- `lightMode` — `true` only when the user asks for the Standard tier (Claude Sonnet 5.5, faster and lower cost), whether they call it Standard, light, faster or cheaper; omit otherwise, which runs the Premium tier (Claude Opus 5.5, the default).
|
|
18
18
|
|
|
19
19
|
The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
|
|
20
20
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "5.35.0-staging.
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-11-
|
|
2
|
+
"release": "5.35.0-staging.330",
|
|
3
|
+
"buildId": "run-330-1",
|
|
4
|
+
"commitSha": "9e9e21ceb30371ab267c84fd62346a0ae9858ce8",
|
|
5
|
+
"buildTime": "2026-11-11T03:01:40Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, 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, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-
|
|
1
|
+
export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, 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, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-3MGYJFPU.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggle",
|
|
4
|
-
"version": "5.35.0-staging.
|
|
4
|
+
"version": "5.35.0-staging.330",
|
|
5
5
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
"typecheck:browser-bench": "tsc --noEmit -p internal/browser-bench/tsconfig.json"
|
|
67
67
|
},
|
|
68
68
|
"muggleConfig": {
|
|
69
|
-
"electronAppVersion": "1.24.
|
|
69
|
+
"electronAppVersion": "1.24.16",
|
|
70
70
|
"downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
|
|
71
71
|
"runtimeTargetDefault": "staging",
|
|
72
72
|
"checksumsByStream": {
|
|
73
73
|
"production": {
|
|
74
|
-
"win32-x64": "
|
|
75
|
-
"linux-x64": "
|
|
76
|
-
"darwin-arm64": "
|
|
77
|
-
"darwin-x64": "
|
|
74
|
+
"win32-x64": "9645ed8e777fada8893c9f61abc1cdad827808385a68a462c4c087c02dcbaea0",
|
|
75
|
+
"linux-x64": "7067dc5b8fc805c72f615237c6a91f9b5b39381f1b39ce24618b67b2d38fbfe3",
|
|
76
|
+
"darwin-arm64": "19389b118394f576ae206737a129f797b386cd8d138f2f4d58e0ad121e89a174",
|
|
77
|
+
"darwin-x64": "258a27c4474bd875b441d432f1c5d992b1ce485f72a1ac4849e4dd3af1fa2c4f"
|
|
78
78
|
},
|
|
79
79
|
"staging": {
|
|
80
|
-
"darwin-arm64": "
|
|
81
|
-
"linux-x64": "
|
|
82
|
-
"win32-x64": "
|
|
83
|
-
"darwin-x64": "
|
|
80
|
+
"darwin-arm64": "2c408bae15a83eb1ddf2946fa82c1108ec9cdb918753f539e66c0fddbb0d3091",
|
|
81
|
+
"linux-x64": "5fe31d7544c2b89714730afe583ceaf1365247496815757a3c6fd7d4703ac8a7",
|
|
82
|
+
"win32-x64": "28ba946a81e4bc1aa70aa3597bfa102c54ff006d4b787e5ea4710db7e26b7764",
|
|
83
|
+
"darwin-x64": "87806b5ca988aeb4cce35a12ae7d1e79a6b8387ee5bf24d0af64fd08d32ee98a"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"electronAppSignedFromVersion": "1.10.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
4
|
-
"version": "5.35.0-staging.
|
|
4
|
+
"version": "5.35.0-staging.330",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
package/plugin/.codex-mcp.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
5
|
-
"version": "5.35.0-staging.
|
|
5
|
+
"version": "5.35.0-staging.330",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/.mcp.json
CHANGED
|
@@ -21,6 +21,13 @@ set -uo pipefail
|
|
|
21
21
|
# never fire again, so its state flag ends the check in-shell. detectBuildIntent
|
|
22
22
|
# drops a question or a slash command whatever verbs it holds, so those end here
|
|
23
23
|
# too, except a /muggle-do or /mdo command, which Node must see to arm the gate.
|
|
24
|
+
#
|
|
25
|
+
# A pasted log makes the prompt hundreds of KB, and capturing it with a regex costs
|
|
26
|
+
# about 1.5 ms per KB, so the prompt is never extracted. The payload is cut at its
|
|
27
|
+
# "prompt" key, which a string value cannot spell unescaped, and the question and
|
|
28
|
+
# slash checks read only the head of what follows while the verbs are glob
|
|
29
|
+
# substring tests, several times cheaper than one alternation regex. Whatever
|
|
30
|
+
# follows the prompt in the payload is searched too, which only over-matches.
|
|
24
31
|
|
|
25
32
|
guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
26
33
|
[[ $guardrail_script_dir == "${BASH_SOURCE[0]}" ]] && guardrail_script_dir=.
|
|
@@ -28,27 +35,47 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
28
35
|
|
|
29
36
|
GUARDRAIL_SUBCOMMAND="build-router"
|
|
30
37
|
|
|
38
|
+
# Matched case-insensitively as substrings, so "muggle-do" and "mdo" cover every
|
|
39
|
+
# /muggle-do, /muggle:mdo and $mdo spelling.
|
|
40
|
+
BUILD_ROUTER_WORDS=(implement build add create write fix refactor "wire up" "hook up" make "change the" conflict merged passing green muggle-do mdo)
|
|
41
|
+
|
|
31
42
|
guardrail_wants() {
|
|
32
43
|
if guardrail_load_state && guardrail_state_has '"buildIntentRouted": true'; then
|
|
33
44
|
return 1
|
|
34
45
|
fi
|
|
35
|
-
|
|
46
|
+
local prompt_key='"prompt"'
|
|
47
|
+
[[ $GUARDRAIL_PAYLOAD == *"$prompt_key"* ]] || return 1
|
|
48
|
+
local prompt_onward="${GUARDRAIL_PAYLOAD#*"$prompt_key"}"
|
|
49
|
+
local value_opening_pattern='^[[:space:]]*:[[:space:]]*"'
|
|
50
|
+
[[ ${prompt_onward:0:64} =~ $value_opening_pattern ]] || return 1
|
|
51
|
+
prompt_onward="${prompt_onward:${#BASH_REMATCH[0]}}"
|
|
52
|
+
local prompt_head="${prompt_onward:0:256}"
|
|
36
53
|
# The prompt is still JSON-escaped: an escaped newline, return or tab counts as leading
|
|
37
|
-
# space, and any other escape leaves the prompt to Node.
|
|
54
|
+
# space, and any other escape leaves the prompt to Node. The value's closing quote ends
|
|
55
|
+
# a command name the way the end of the prompt does.
|
|
38
56
|
local leading_space='^([[:space:]]|\\[nrt])*'
|
|
39
57
|
local question_pattern="$leading_space"'(why|what|how|when|where|who|is|are|does|do|can you (explain|tell)|explain)([^A-Za-z0-9_]|$)'
|
|
40
58
|
local slash_command_pattern="$leading_space"'/'
|
|
41
|
-
local muggle_do_command_pattern="$leading_space"'/([A-Za-z0-9_-]+:)?(muggle-do|mdo)([[:space:]]
|
|
59
|
+
local muggle_do_command_pattern="$leading_space"'/([A-Za-z0-9_-]+:)?(muggle-do|mdo)([[:space:]]|\\|"|$)'
|
|
42
60
|
local is_rejected_by_node=1
|
|
43
61
|
shopt -s nocasematch
|
|
44
|
-
if [[ $
|
|
62
|
+
if [[ $prompt_head =~ $question_pattern ]]; then
|
|
45
63
|
is_rejected_by_node=0
|
|
46
|
-
elif [[ $
|
|
64
|
+
elif [[ $prompt_head =~ $slash_command_pattern && ! $prompt_head =~ $muggle_do_command_pattern ]]; then
|
|
47
65
|
is_rejected_by_node=0
|
|
48
66
|
fi
|
|
67
|
+
local is_build_word_found=1
|
|
68
|
+
if ((is_rejected_by_node == 1)); then
|
|
69
|
+
local build_word
|
|
70
|
+
for build_word in "${BUILD_ROUTER_WORDS[@]}"; do
|
|
71
|
+
if [[ $prompt_onward == *"$build_word"* ]]; then
|
|
72
|
+
is_build_word_found=0
|
|
73
|
+
break
|
|
74
|
+
fi
|
|
75
|
+
done
|
|
76
|
+
fi
|
|
49
77
|
shopt -u nocasematch
|
|
50
|
-
|
|
51
|
-
guardrail_fields_match prompt '(implement|build|add|create|write|fix|refactor|wire up|hook up|make|change the|conflict|merged|passing|green|[/$](muggle:)?(muggle-do|mdo))'
|
|
78
|
+
return "$is_build_word_found"
|
|
52
79
|
}
|
|
53
80
|
|
|
54
81
|
if guardrail_is_hook_script; then
|
|
@@ -10,8 +10,8 @@ set -uo pipefail
|
|
|
10
10
|
# it fires on EVERY turn end, so the pre-filter has to be cheap. The claim lives
|
|
11
11
|
# in the assistant's prose. A payload carrying the closing message
|
|
12
12
|
# (`last_assistant_message` — Codex always sends it, Claude Code may) is
|
|
13
|
-
# searched in-shell; otherwise the filter greps the transcript tail for
|
|
14
|
-
#
|
|
13
|
+
# searched in-shell; otherwise the filter greps the transcript tail for the
|
|
14
|
+
# detector's three word groups in-shell and spawns Node only on a hit. Node then applies
|
|
15
15
|
# the real per-sentence detector, which is what keeps a genuine SMS/TOTP limit
|
|
16
16
|
# from being "corrected". Over-matching here costs a needless spawn; it can
|
|
17
17
|
# never emit a spurious nudge. Degrades to {} so it never blocks on its own
|
|
@@ -23,14 +23,30 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
23
23
|
|
|
24
24
|
GUARDRAIL_SUBCOMMAND="capability-claim-gate"
|
|
25
25
|
|
|
26
|
+
# Whether the text holds all three word groups detectFalseCapabilityClaim needs in one sentence:
|
|
27
|
+
# an impossibility, a flow a managed profile clears, and a testing context. Each is a superset of
|
|
28
|
+
# its capabilityClaim.ts pattern, matched anywhere in the text, so it never drops a claim Node
|
|
29
|
+
# would catch. An impossibility word alone hits most turn ends, which say "can't" about anything.
|
|
30
|
+
# The apostrophe slot takes a curly quote as UTF-8 bytes or as the backslash-u2019 escape JSON may carry.
|
|
31
|
+
capability_claim_text_could_match() {
|
|
32
|
+
local text="$1"
|
|
33
|
+
local impossibility_pattern='can(.{1,3}|\\u2019)t|could ?n(.{1,3}|\\u2019)?t|unable to|no way to|not able to|untestable|unverifiable|not testable|impossible|infeasible|blocked from|no (local )?(mail|email|smtp) path'
|
|
34
|
+
local cleared_flow_pattern='link|otp|code|password|verif|2fa|factor|inbox|mail|smtp|captcha|log ?in|logged|sign|auth|credential|sms|text|totp'
|
|
35
|
+
local testing_context_pattern='e2e|end.to.end|test|verif|validat|automat|coverage|covered|exercis|reproduc|replay|script|muggle|playwright|cypress|selenium'
|
|
36
|
+
local matched=1
|
|
37
|
+
shopt -s nocasematch
|
|
38
|
+
[[ $text =~ $impossibility_pattern && $text =~ $cleared_flow_pattern && $text =~ $testing_context_pattern ]] && matched=0
|
|
39
|
+
shopt -u nocasematch
|
|
40
|
+
return "$matched"
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
guardrail_wants() {
|
|
27
44
|
if guardrail_load_state && guardrail_state_has '"capabilityClaimNudged": true'; then
|
|
28
45
|
return 1
|
|
29
46
|
fi
|
|
30
|
-
local claim_pattern='can.t|cannot|unable to|no way to|untestable|unverifiable|impossible|infeasible'
|
|
31
47
|
local closing_message_pattern='"last_assistant_message"[[:space:]]*:[[:space:]]*"'
|
|
32
48
|
if [[ $GUARDRAIL_PAYLOAD =~ $closing_message_pattern ]]; then
|
|
33
|
-
|
|
49
|
+
capability_claim_text_could_match "$GUARDRAIL_PAYLOAD"
|
|
34
50
|
return
|
|
35
51
|
fi
|
|
36
52
|
local transcript_pattern='"transcript_path"[[:space:]]*:[[:space:]]*"([^"]*)"'
|
|
@@ -42,11 +58,7 @@ guardrail_wants() {
|
|
|
42
58
|
# in-shell costs more than a tail. Gone for the session once the gate has nudged.
|
|
43
59
|
local transcript_tail
|
|
44
60
|
transcript_tail="$(tail -c 20000 "$transcript" 2>/dev/null)"
|
|
45
|
-
|
|
46
|
-
shopt -s nocasematch
|
|
47
|
-
[[ $transcript_tail =~ $claim_pattern ]] && matched=0
|
|
48
|
-
shopt -u nocasematch
|
|
49
|
-
return "$matched"
|
|
61
|
+
capability_claim_text_could_match "$transcript_tail"
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
if guardrail_is_hook_script; then
|
|
@@ -21,7 +21,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
21
21
|
GUARDRAIL_SUBCOMMAND="classify-gate"
|
|
22
22
|
|
|
23
23
|
guardrail_wants() {
|
|
24
|
-
|
|
24
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="pr-opened"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(create|ready)|glab[[:space:]]+mr[[:space:]]+(create|update)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -14,6 +14,12 @@ set -uo pipefail
|
|
|
14
14
|
# dropped it a close+reopen — routine, to re-fire a lost workflow trigger — left
|
|
15
15
|
# the handoff armed on a change that is open again. Degrades to {} so it never
|
|
16
16
|
# blocks.
|
|
17
|
+
#
|
|
18
|
+
# The output shapes are searched across the whole payload, which carries the
|
|
19
|
+
# command's full output, so the command is checked first: detectPrTerminal only
|
|
20
|
+
# reads the output of a merge, close or reopen, or of the watch scripts, and a
|
|
21
|
+
# payload with no command at all is left to it. Every other command ends here
|
|
22
|
+
# before its output is scanned.
|
|
17
23
|
|
|
18
24
|
guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
19
25
|
[[ $guardrail_script_dir == "${BASH_SOURCE[0]}" ]] && guardrail_script_dir=.
|
|
@@ -22,6 +28,14 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
22
28
|
GUARDRAIL_SUBCOMMAND="pr-terminal"
|
|
23
29
|
|
|
24
30
|
guardrail_wants() {
|
|
31
|
+
if guardrail_payload_field command; then
|
|
32
|
+
local terminal_command_pattern='(gh|glab)[[:space:]]+(pr|mr)[[:space:]]+(merge|close|reopen)|pr-watch-(loop|arm)\.sh'
|
|
33
|
+
local is_terminal_command=1
|
|
34
|
+
shopt -s nocasematch
|
|
35
|
+
[[ $GUARDRAIL_FIELD_VALUE =~ $terminal_command_pattern ]] && is_terminal_command=0
|
|
36
|
+
shopt -u nocasematch
|
|
37
|
+
((is_terminal_command == 0)) || return 1
|
|
38
|
+
fi
|
|
25
39
|
guardrail_payload_matches '(merged|closed|reopened) pull request|TERMINAL pr='
|
|
26
40
|
}
|
|
27
41
|
|
|
@@ -25,7 +25,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
25
25
|
GUARDRAIL_SUBCOMMAND="record-comment-replies"
|
|
26
26
|
|
|
27
27
|
guardrail_wants() {
|
|
28
|
-
|
|
28
|
+
guardrail_fields_match command 'reviewThreads|merge_requests/[0-9]+/discussions|comments/[0-9]+/replies|discussions/[A-Za-z0-9_-]+/notes|MUGGLE_[A-Z0-9_]+_SKIP'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
if guardrail_is_hook_script; then
|
|
@@ -17,7 +17,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
17
17
|
GUARDRAIL_SUBCOMMAND="record-delegation"
|
|
18
18
|
|
|
19
19
|
guardrail_wants() {
|
|
20
|
-
|
|
20
|
+
guardrail_fields_match subagent_type 'acceptance-tester'
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if guardrail_is_hook_script; then
|
|
@@ -20,7 +20,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
20
20
|
GUARDRAIL_SUBCOMMAND="record-stage-signals"
|
|
21
21
|
|
|
22
22
|
guardrail_wants() {
|
|
23
|
-
|
|
23
|
+
guardrail_fields_match command tool_name 'MUGGLE_[A-Z0-9_]+_SKIP|muggle.*(telemetry[-_]event[-_]emit|user[-_]feedback[-_]create)'
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if guardrail_is_hook_script; then
|
|
@@ -24,7 +24,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
24
24
|
GUARDRAIL_SUBCOMMAND="report-gate"
|
|
25
25
|
|
|
26
26
|
guardrail_wants() {
|
|
27
|
-
|
|
27
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]'
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if guardrail_is_hook_script; then
|
|
@@ -19,7 +19,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
19
19
|
GUARDRAIL_SUBCOMMAND="resolve-gate"
|
|
20
20
|
|
|
21
21
|
guardrail_wants() {
|
|
22
|
-
|
|
22
|
+
guardrail_fields_match command 'resolveReviewThread|resolved=(true|false)'
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
if guardrail_is_hook_script; then
|
|
@@ -21,7 +21,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
21
21
|
GUARDRAIL_SUBCOMMAND="walkthrough-heading-gate"
|
|
22
22
|
|
|
23
23
|
guardrail_wants() {
|
|
24
|
-
|
|
24
|
+
guardrail_fields_match command 'gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]'
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="walkthrough-progress-update"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -18,7 +18,7 @@ guardrail_script_dir="${BASH_SOURCE[0]%/*}"
|
|
|
18
18
|
GUARDRAIL_SUBCOMMAND="walkthrough-rerun-notice"
|
|
19
19
|
|
|
20
20
|
guardrail_wants() {
|
|
21
|
-
|
|
21
|
+
guardrail_fields_match tool_name 'muggle[-_]local[-_](execute[-_]test[-_]generation|execute[-_]replay)'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if guardrail_is_hook_script; then
|
|
@@ -14,7 +14,7 @@ The caller resolves these before the loop and supplies them per test case:
|
|
|
14
14
|
- `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
|
|
15
15
|
- `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
|
|
16
16
|
- `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
|
|
17
|
-
- `lightMode` — `true` only when the user asks for
|
|
17
|
+
- `lightMode` — `true` only when the user asks for the Standard tier (Claude Sonnet 5.5, faster and lower cost), whether they call it Standard, light, faster or cheaper; omit otherwise, which runs the Premium tier (Claude Opus 5.5, the default).
|
|
18
18
|
|
|
19
19
|
The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
|
|
20
20
|
|