@muggleai/works 5.39.0-staging.364 → 5.39.0-staging.366

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.
@@ -10,7 +10,7 @@
10
10
  "name": "muggleai",
11
11
  "source": "./plugin",
12
12
  "description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
13
- "version": "5.39.0-staging.364"
13
+ "version": "5.39.0-staging.366"
14
14
  }
15
15
  ]
16
16
  }
@@ -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, local_exports, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, isTelemetryEnabled, isInitialized, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, WatchQosSignal, WatchQosDetector, AgentHost, getInstallId } from './chunk-WVI66TNW.js';
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, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, initTelemetry, 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, local_exports, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, isTelemetryEnabled, isInitialized, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, WatchQosSignal, WatchQosDetector, AgentHost, getInstallId } from './chunk-SPTMLR5Z.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';
@@ -1375,7 +1375,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1375
1375
  if (gsUrls.length === 0) {
1376
1376
  return report;
1377
1377
  }
1378
- const mcps = await import('./src-LQAFT4NM.js');
1378
+ const mcps = await import('./src-BKZUICKO.js');
1379
1379
  const credentials = await mcps.getCallerCredentialsAsync();
1380
1380
  if (!credentials.bearerToken && !credentials.apiKey) {
1381
1381
  stderrWrite(
@@ -4672,6 +4672,16 @@ Wrote ${htmlPath}`);
4672
4672
  }
4673
4673
  }
4674
4674
 
4675
+ // src/client-telemetry/constants.ts
4676
+ var RESOURCE_DETECTORS_ENV_VAR = "OTEL_NODE_RESOURCE_DETECTORS";
4677
+ var CONSOLE_FREE_RESOURCE_DETECTORS = "env,os";
4678
+
4679
+ // src/client-telemetry/start-client-telemetry.ts
4680
+ function startClientTelemetry(options) {
4681
+ process.env[RESOURCE_DETECTORS_ENV_VAR] ??= CONSOLE_FREE_RESOURCE_DETECTORS;
4682
+ initTelemetry(options);
4683
+ }
4684
+
4675
4685
  // src/cli/disclosure/disclosure-constants.ts
4676
4686
  var DISCLOSURE_OPT_OUT_MARKER = "To opt out,";
4677
4687
  var DISCLOSURE_OPT_OUT_COPY = 'To opt out, set MUGGLE_TELEMETRY_DISABLED=1 in your environment, or set "telemetryEnabled": false at the top level of ~/.muggle-ai/preferences.json.';
@@ -4716,7 +4726,7 @@ async function serveCommand(options) {
4716
4726
  });
4717
4727
  try {
4718
4728
  showDisclosureIfNeeded();
4719
- initTelemetry({
4729
+ startClientTelemetry({
4720
4730
  serviceName: ServiceName.MuggleMcp,
4721
4731
  surface: Surface.McpLocal,
4722
4732
  connectionString: APPLICATIONINSIGHTS_CONNECTION_STRING,
@@ -5075,6 +5085,7 @@ async function extractZip(zipPath, destDir) {
5075
5085
  execFile(
5076
5086
  "powershell",
5077
5087
  ["-command", `Expand-Archive -Path '${zipPath}' -DestinationPath '${destDir}' -Force`],
5088
+ { windowsHide: true },
5078
5089
  (error) => {
5079
5090
  if (error) {
5080
5091
  reject(error);
@@ -5084,7 +5095,7 @@ async function extractZip(zipPath, destDir) {
5084
5095
  }
5085
5096
  );
5086
5097
  } else {
5087
- execFile("unzip", ["-o", zipPath, "-d", destDir], (error) => {
5098
+ execFile("unzip", ["-o", zipPath, "-d", destDir], { windowsHide: true }, (error) => {
5088
5099
  if (error) {
5089
5100
  reject(error);
5090
5101
  } else {
@@ -5096,7 +5107,7 @@ async function extractZip(zipPath, destDir) {
5096
5107
  }
5097
5108
  async function extractTarGz(tarPath, destDir) {
5098
5109
  return new Promise((resolve3, reject) => {
5099
- execFile("tar", ["-xzf", tarPath, "-C", destDir], (error) => {
5110
+ execFile("tar", ["-xzf", tarPath, "-C", destDir], { windowsHide: true }, (error) => {
5100
5111
  if (error) {
5101
5112
  reject(error);
5102
5113
  } else {
@@ -5598,6 +5609,7 @@ async function extractZip2(zipPath, destDir) {
5598
5609
  execFile(
5599
5610
  "powershell",
5600
5611
  ["-command", `Expand-Archive -Path '${zipPath}' -DestinationPath '${destDir}' -Force`],
5612
+ { windowsHide: true },
5601
5613
  (error) => {
5602
5614
  if (error) {
5603
5615
  reject(error);
@@ -5607,7 +5619,7 @@ async function extractZip2(zipPath, destDir) {
5607
5619
  }
5608
5620
  );
5609
5621
  } else {
5610
- execFile("unzip", ["-o", zipPath, "-d", destDir], (error) => {
5622
+ execFile("unzip", ["-o", zipPath, "-d", destDir], { windowsHide: true }, (error) => {
5611
5623
  if (error) {
5612
5624
  reject(error);
5613
5625
  } else {
@@ -5619,7 +5631,7 @@ async function extractZip2(zipPath, destDir) {
5619
5631
  }
5620
5632
  async function extractTarGz2(tarPath, destDir) {
5621
5633
  return new Promise((resolve3, reject) => {
5622
- execFile("tar", ["-xzf", tarPath, "-C", destDir], (error) => {
5634
+ execFile("tar", ["-xzf", tarPath, "-C", destDir], { windowsHide: true }, (error) => {
5623
5635
  if (error) {
5624
5636
  reject(error);
5625
5637
  } else {
@@ -5991,7 +6003,7 @@ function createTelemetryWatchQosUploadDeps(paths, connectionString, environment)
5991
6003
  paths,
5992
6004
  isTelemetryEnabled,
5993
6005
  isTelemetryReady: () => {
5994
- initTelemetry({
6006
+ startClientTelemetry({
5995
6007
  serviceName: ServiceName.MuggleMcp,
5996
6008
  surface: Surface.McpLocal,
5997
6009
  connectionString,
@@ -901,7 +901,7 @@ async function openBrowserUrl(options) {
901
901
  try {
902
902
  const command = getOpenCommand(options.url);
903
903
  logger2.debug("[Browser] Opening URL", { url: options.url, command });
904
- exec(command, (error) => {
904
+ exec(command, { windowsHide: true }, (error) => {
905
905
  if (error) {
906
906
  logger2.warn("[Browser] Failed to open URL", {
907
907
  url: options.url,
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-HJS3DVQV.js';
3
- import './chunk-WVI66TNW.js';
2
+ import { runCli } from './chunk-RNRNBDIX.js';
3
+ import './chunk-SPTMLR5Z.js';
4
4
 
5
5
  // src/cli/main.ts
6
6
  runCli().catch((error) => {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-HJS3DVQV.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-WVI66TNW.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-RNRNBDIX.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-SPTMLR5Z.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.39.0-staging.364",
4
+ "version": "5.39.0-staging.366",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.39.0-staging.364",
7
+ "@muggleai/works@5.39.0-staging.366",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.39.0-staging.364",
3
+ "version": "5.39.0-staging.366",
4
4
  "description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -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.39.0-staging.364",
5
+ "version": "5.39.0-staging.366",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.39.0-staging.364",
7
+ "@muggleai/works@5.39.0-staging.366",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -102,16 +102,27 @@ Every hook here fires on every tool call, prompt or turn end in every open sessi
102
102
 
103
103
  | Cap | Limit |
104
104
  | :-- | :-- |
105
- | Hook commands an irrelevant event launches per busy slot (PostToolUse on `Bash` and `Read`, Stop, UserPromptSubmit) | 1 (PreToolUse on `Bash` and PostToolUse on `PowerShell`: 0, their `if` rules launch nothing for a command naming no trigger) |
105
+ | Hook commands an irrelevant event launches per busy slot | PostToolUse on `Bash` and `Read`: 1; Stop and UserPromptSubmit: 2, the synchronous hook and its `asyncRewake` companion; PreToolUse on `Bash` and PostToolUse on `PowerShell`: 0, their `if` rules launch nothing for a command naming no trigger |
106
106
  | A hook's own `bash` launch inside Git Bash, where `hook-entry.sh` runs the script in place | 0 (elsewhere 1 per command) |
107
- | Programs started beyond each hook's own launch on an irrelevant event | 0 (Stop: 1, a transcript `tail` until the capability-claim gate has nudged; bash cannot seek) |
107
+ | Programs started beyond each hook's own launch on an irrelevant event | 0 (Stop: 2, a transcript `tail` in the synchronous run and in its companion until the capability-claim gate has nudged; bash cannot seek) |
108
108
  | `node`, `gh`, `python` on that path | 0 |
109
- | Median wall time of one irrelevant firing, Linux/macOS | 100 ms |
110
- | Distinct hook commands in the whole manifest (a command's `if` variants count once) | 13 |
109
+ | Median wall time of one irrelevant firing | Linux/macOS 100 ms; Windows 250 ms, where each Git Bash start alone costs about 20 ms |
110
+ | Distinct hook commands in the whole manifest (a command's `if` variants count once) | 15 |
111
111
  | Hook timeout | declared on every hook; 1 s each, 2 s summed over the hooks one firing launches, a command's `if` variants counted once since they start together and one claims the call; SessionStart 5 s each, 10 s summed |
112
112
  | Median wall time of each hook, on every scenario in `HOOK_RUNTIME_SCENARIOS`, every platform | 1 s |
113
113
  | Summed median wall time of the hooks one firing launches | 2 s |
114
114
 
115
+ The wall-time harness fails when `bash` is not on `PATH` rather than timing hooks that never ran.
116
+
115
117
  Counts are exec counts, so they are identical on every runner. Every count is exact: CI fails when a change exceeds a limit, and also when it beats one until `footprint/constants.ts` is lowered to match, so a gain cannot be given back later.
116
118
 
117
119
  The harness kills a hook at its timeout, so on the per-call, per-prompt and per-turn events the 1 s timeout is the hard cap; the runtime scenarios hold each hook inside it. SessionStart fires once per session and carries the session's whole muggle context, so its hooks declare 5 s — room for a loaded machine to start bash and Node instead of dropping that context — while the scenarios still hold their runtime to 1 s. They fire every `hooks.json` group — a group no scenario fires fails CI — on its irrelevant path and on the payloads that make its gates do real work, with `gh`, `muggle`, `npm`, `npx`, `curl` and `wget` replaced by stand-ins that stall for 5 s, so a hook that waits on the network or an install fails there rather than on a user's machine. Work that has to wait on the network leaves the hook path: the walkthrough comment's reserve and settle writes and the walkthrough gate's provider scan run as detached `guardrails.mjs` background jobs, and every other child a gate starts (`git`, the dev-server probe) is cut to what is left of a 600 ms allowance (`src/hook-budget/`).
120
+
121
+ ## Console windows
122
+
123
+ A process with no console of its own (a Codex hook on Windows, a detached job, the scheduled watch task) gives every console child it starts a fresh, visible window that takes focus from whatever the user is typing into. Two CI guards hold everything the package ships to `windowsHide: true`:
124
+
125
+ | Guard | Covers |
126
+ | :-- | :-- |
127
+ | `src/test/guardrails/shipped-spawn-windows-hide.test.ts` | Every `child_process` call in a `package.json` `files` entry or a source bundled into `dist`, followed through aliases, `require` and `promisify`. A call that launches a GUI program goes in `ALLOWED_UNHIDDEN_SPAWNS` with its reason, since `windowsHide` would hide that program's window |
128
+ | `src/test/guardrails/mcp-server-boot-console-free.test.ts` | A real `muggle serve` boot with telemetry on, under a preload that records every child started without `windowsHide`, dependencies included. Client telemetry starts through `startClientTelemetry`, which drops the OpenTelemetry `host` resource detector: on Windows it reads the machine id by running `REG.exe` through `cmd` |
@@ -1,7 +1,7 @@
1
1
  {
2
- "release": "5.39.0-staging.364",
3
- "buildId": "run-364-1",
4
- "commitSha": "5bdf1adabcb7c19d563636372b26f71ba84f4fcd",
2
+ "release": "5.39.0-staging.366",
3
+ "buildId": "run-366-1",
4
+ "commitSha": "36ac2901e234d455b844715ca540c4c85ab58967",
5
5
  "buildTime": "2026-11-12T07:45:22Z",
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, StudioJobPriorityEnum, 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-WVI66TNW.js';
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, StudioJobPriorityEnum, 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-SPTMLR5Z.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@muggleai/works",
3
3
  "mcpName": "io.github.multiplex-ai/muggleai",
4
- "version": "5.39.0-staging.364",
4
+ "version": "5.39.0-staging.366",
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",
@@ -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.39.0-staging.364",
4
+ "version": "5.39.0-staging.366",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.39.0-staging.364",
7
+ "@muggleai/works@5.39.0-staging.366",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.39.0-staging.364",
3
+ "version": "5.39.0-staging.366",
4
4
  "description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -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.39.0-staging.364",
5
+ "version": "5.39.0-staging.366",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.39.0-staging.364",
7
+ "@muggleai/works@5.39.0-staging.366",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -102,16 +102,27 @@ Every hook here fires on every tool call, prompt or turn end in every open sessi
102
102
 
103
103
  | Cap | Limit |
104
104
  | :-- | :-- |
105
- | Hook commands an irrelevant event launches per busy slot (PostToolUse on `Bash` and `Read`, Stop, UserPromptSubmit) | 1 (PreToolUse on `Bash` and PostToolUse on `PowerShell`: 0, their `if` rules launch nothing for a command naming no trigger) |
105
+ | Hook commands an irrelevant event launches per busy slot | PostToolUse on `Bash` and `Read`: 1; Stop and UserPromptSubmit: 2, the synchronous hook and its `asyncRewake` companion; PreToolUse on `Bash` and PostToolUse on `PowerShell`: 0, their `if` rules launch nothing for a command naming no trigger |
106
106
  | A hook's own `bash` launch inside Git Bash, where `hook-entry.sh` runs the script in place | 0 (elsewhere 1 per command) |
107
- | Programs started beyond each hook's own launch on an irrelevant event | 0 (Stop: 1, a transcript `tail` until the capability-claim gate has nudged; bash cannot seek) |
107
+ | Programs started beyond each hook's own launch on an irrelevant event | 0 (Stop: 2, a transcript `tail` in the synchronous run and in its companion until the capability-claim gate has nudged; bash cannot seek) |
108
108
  | `node`, `gh`, `python` on that path | 0 |
109
- | Median wall time of one irrelevant firing, Linux/macOS | 100 ms |
110
- | Distinct hook commands in the whole manifest (a command's `if` variants count once) | 13 |
109
+ | Median wall time of one irrelevant firing | Linux/macOS 100 ms; Windows 250 ms, where each Git Bash start alone costs about 20 ms |
110
+ | Distinct hook commands in the whole manifest (a command's `if` variants count once) | 15 |
111
111
  | Hook timeout | declared on every hook; 1 s each, 2 s summed over the hooks one firing launches, a command's `if` variants counted once since they start together and one claims the call; SessionStart 5 s each, 10 s summed |
112
112
  | Median wall time of each hook, on every scenario in `HOOK_RUNTIME_SCENARIOS`, every platform | 1 s |
113
113
  | Summed median wall time of the hooks one firing launches | 2 s |
114
114
 
115
+ The wall-time harness fails when `bash` is not on `PATH` rather than timing hooks that never ran.
116
+
115
117
  Counts are exec counts, so they are identical on every runner. Every count is exact: CI fails when a change exceeds a limit, and also when it beats one until `footprint/constants.ts` is lowered to match, so a gain cannot be given back later.
116
118
 
117
119
  The harness kills a hook at its timeout, so on the per-call, per-prompt and per-turn events the 1 s timeout is the hard cap; the runtime scenarios hold each hook inside it. SessionStart fires once per session and carries the session's whole muggle context, so its hooks declare 5 s — room for a loaded machine to start bash and Node instead of dropping that context — while the scenarios still hold their runtime to 1 s. They fire every `hooks.json` group — a group no scenario fires fails CI — on its irrelevant path and on the payloads that make its gates do real work, with `gh`, `muggle`, `npm`, `npx`, `curl` and `wget` replaced by stand-ins that stall for 5 s, so a hook that waits on the network or an install fails there rather than on a user's machine. Work that has to wait on the network leaves the hook path: the walkthrough comment's reserve and settle writes and the walkthrough gate's provider scan run as detached `guardrails.mjs` background jobs, and every other child a gate starts (`git`, the dev-server probe) is cut to what is left of a 600 ms allowance (`src/hook-budget/`).
120
+
121
+ ## Console windows
122
+
123
+ A process with no console of its own (a Codex hook on Windows, a detached job, the scheduled watch task) gives every console child it starts a fresh, visible window that takes focus from whatever the user is typing into. Two CI guards hold everything the package ships to `windowsHide: true`:
124
+
125
+ | Guard | Covers |
126
+ | :-- | :-- |
127
+ | `src/test/guardrails/shipped-spawn-windows-hide.test.ts` | Every `child_process` call in a `package.json` `files` entry or a source bundled into `dist`, followed through aliases, `require` and `promisify`. A call that launches a GUI program goes in `ALLOWED_UNHIDDEN_SPAWNS` with its reason, since `windowsHide` would hide that program's window |
128
+ | `src/test/guardrails/mcp-server-boot-console-free.test.ts` | A real `muggle serve` boot with telemetry on, under a preload that records every child started without `windowsHide`, dependencies included. Client telemetry starts through `startClientTelemetry`, which drops the OpenTelemetry `host` resource detector: on Windows it reads the machine id by running `REG.exe` through `cmd` |
@@ -919,7 +919,7 @@ async function extractZip(zipPath, destDir) {
919
919
  ? `powershell -command "Expand-Archive -Path '${zipPath}' -DestinationPath '${destDir}' -Force"`
920
920
  : `unzip -o "${zipPath}" -d "${destDir}"`;
921
921
 
922
- exec(cmd, (error, stdout, stderr) => {
922
+ exec(cmd, { windowsHide: true }, (error, stdout, stderr) => {
923
923
  if (error) {
924
924
  logError("Extraction command failed:", cmd);
925
925
  logError("stdout:", stdout);
@@ -939,7 +939,7 @@ async function extractZip(zipPath, destDir) {
939
939
  */
940
940
  async function extractTarGz(tarPath, destDir) {
941
941
  return new Promise((resolve, reject) => {
942
- exec(`tar -xzf "${tarPath}" -C "${destDir}"`, (error) => {
942
+ exec(`tar -xzf "${tarPath}" -C "${destDir}"`, { windowsHide: true }, (error) => {
943
943
  if (error) {
944
944
  reject(error);
945
945
  } else {
@@ -51,7 +51,11 @@ function listProcessPaths() {
51
51
  windowsHide: true,
52
52
  timeout: PROCESS_LIST_TIMEOUT_MS,
53
53
  })
54
- : spawnSync("ps", ["-A", "-ww", "-o", "command="], { encoding: "utf-8", timeout: PROCESS_LIST_TIMEOUT_MS });
54
+ : spawnSync("ps", ["-A", "-ww", "-o", "command="], {
55
+ encoding: "utf-8",
56
+ windowsHide: true,
57
+ timeout: PROCESS_LIST_TIMEOUT_MS,
58
+ });
55
59
  if (processList.error || processList.status !== 0) {
56
60
  return null;
57
61
  }