@reticlehq/server 2.13.0 → 2.13.1

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.
@@ -25,6 +25,14 @@ export interface WaitFacts {
25
25
  readonly quietForMs: number;
26
26
  /** Milliseconds since the wait began. */
27
27
  readonly elapsedMs: number;
28
+ /**
29
+ * How long silence may mean "still starting" on THIS machine. Defaults to QUIET_MEANS_HUNG_MS.
30
+ *
31
+ * Passed in rather than read from the platform here, so this stays a pure decision and exactly one
32
+ * caller owns the platform check. 45s is generous on a laptop and tight on a cold Windows runner,
33
+ * where a first `npm run dev` optimises dependencies before Vite prints a line.
34
+ */
35
+ readonly quietMeansHungMs?: number;
28
36
  }
29
37
  export declare const WaitVerdict: {
30
38
  /** It is up. Carry on. */
@@ -41,7 +41,9 @@ export function judgeWait(facts) {
41
41
  if (facts.elapsedMs >= WAIT_CEILING_MS)
42
42
  return WaitVerdict.HUNG;
43
43
  // Output IS progress. Silence is what distinguishes a build from a wedge.
44
- return facts.quietForMs >= QUIET_MEANS_HUNG_MS ? WaitVerdict.HUNG : WaitVerdict.WAITING;
44
+ return facts.quietForMs >= (facts.quietMeansHungMs ?? QUIET_MEANS_HUNG_MS)
45
+ ? WaitVerdict.HUNG
46
+ : WaitVerdict.WAITING;
45
47
  }
46
48
  /** A url the dev server announced, if it has announced one. Never composed, only read. */
47
49
  const URL_IN_OUTPUT = /https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\]):\d+/;
@@ -11,7 +11,20 @@
11
11
  * way of going wrong, and the alternative to injecting them is a test that boots a real dev server
12
12
  * and a real browser to find out what happens when neither works.
13
13
  */
14
- import { judgeWait, urlToWatch, WaitVerdict } from './dev-server-wait.js';
14
+ import { judgeWait, QUIET_MEANS_HUNG_MS, urlToWatch, WaitVerdict } from './dev-server-wait.js';
15
+ /**
16
+ * Windows gets longer to say something before silence counts as a wedge.
17
+ *
18
+ * A first `npm run dev` on a cold Windows runner optimises dependencies before the bundler prints a
19
+ * line, and 45s of quiet is inside that window. Measured on the install gate: the Vue scaffold was
20
+ * declared hung, `init` exited 1, and the gate then started the very same app and connected to it
21
+ * on the next line. Nothing was wrong with the app; the wait was too impatient for the platform.
22
+ *
23
+ * Only the QUIET budget moves. The ceiling is unchanged, and a launcher that exits is still dead
24
+ * immediately, so this buys patience for a starting server and never for a broken one.
25
+ */
26
+ const WINDOWS_QUIET_MEANS_HUNG_MS = 3 * 60_000;
27
+ const WINDOWS_QUIET_MEANS_HUNG_MS_APPLIES = 'win32' === process.platform;
15
28
  import { pickSession } from './session-pick.js';
16
29
  import { readPage, describePage } from './page-probe.js';
17
30
  import { remainingSteps } from './remaining-steps.js';
@@ -75,6 +88,9 @@ export async function runSetupPhases(input, fx) {
75
88
  serving,
76
89
  quietForMs: fx.devServerQuietForMs(),
77
90
  elapsedMs: fx.now() - startedAt,
91
+ quietMeansHungMs: WINDOWS_QUIET_MEANS_HUNG_MS_APPLIES
92
+ ? WINDOWS_QUIET_MEANS_HUNG_MS
93
+ : QUIET_MEANS_HUNG_MS,
78
94
  });
79
95
  if (WaitVerdict.READY === verdict && undefined !== watching) {
80
96
  url = watching;
package/docs/docs.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "navigation": {
33
33
  "versions": [
34
34
  {
35
- "version": "2.13.0",
35
+ "version": "2.13.1",
36
36
  "default": true,
37
37
  "tabs": [
38
38
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/server",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "Reticle bridge + MCP server. Hosts the browser WS endpoint and exposes MCP tools to the coding agent.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "@modelcontextprotocol/sdk": "^1.30.0",
23
23
  "ws": "^8.21.3",
24
24
  "zod": "^3.24.1",
25
- "@reticlehq/core": "2.13.0"
25
+ "@reticlehq/core": "2.13.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/pngjs": "^6.0.5",