@reticlehq/init 3.1.0 → 3.2.0

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.
@@ -301,7 +301,11 @@ const INSTALL_ARGS = {
301
301
  * hard failure, which is the opposite of the problem being fixed.
302
302
  */
303
303
  const QUIET_INSTALL_ARGS = {
304
- [PackageManager.NPM]: ['--no-audit', '--no-fund'],
304
+ // `--no-update-notifier` joined the other two for the same reason and from the same measurement:
305
+ // a re-capture of a pristine Vite first run spent five of its lines on an `npm notice` block
306
+ // announcing a newer npm, its changelog url and the command to install it. Advice about npm,
307
+ // printed in the middle of somebody wiring up a different tool.
308
+ [PackageManager.NPM]: ['--no-audit', '--no-fund', '--no-update-notifier'],
305
309
  };
306
310
  /** Build a dev-dependency install command for one or more packages (e.g. the kit + its build plugin). */
307
311
  export function installCommandParts(pm, pkgs,
package/dist/index.d.ts CHANGED
@@ -9,6 +9,15 @@
9
9
  * ends up unable to move a file.
10
10
  */
11
11
  export { runInit, resolveLockfiles, type InitIo, type InitOptions, type InitResult, } from './run.js';
12
+ /**
13
+ * Exported for the ONE other place in this repo that spawns a package manager: `reticle update`.
14
+ *
15
+ * It is a pure string rule with its own tests, and it was private while a second caller needed it
16
+ * -- which is exactly the shape that let `reticle setup mcp` reimplement the spawn as a bare
17
+ * `execFileSync` and break on Windows. Two copies of a quoting rule is the version of this bug that
18
+ * is hardest to see, so there is one.
19
+ */
20
+ export { windowsShellArg } from './register/windows-quote.js';
12
21
  export { buildNodeIo, probeCli } from './node-io.js';
13
22
  export { type InitHost, SILENT_HOST } from './host.js';
14
23
  export { RETICLE_VERSION, RETICLE_NPM_PACKAGE } from './version.js';
package/dist/index.js CHANGED
@@ -9,6 +9,15 @@
9
9
  * ends up unable to move a file.
10
10
  */
11
11
  export { runInit, resolveLockfiles, } from './run.js';
12
+ /**
13
+ * Exported for the ONE other place in this repo that spawns a package manager: `reticle update`.
14
+ *
15
+ * It is a pure string rule with its own tests, and it was private while a second caller needed it
16
+ * -- which is exactly the shape that let `reticle setup mcp` reimplement the spawn as a bare
17
+ * `execFileSync` and break on Windows. Two copies of a quoting rule is the version of this bug that
18
+ * is hardest to see, so there is one.
19
+ */
20
+ export { windowsShellArg } from './register/windows-quote.js';
12
21
  export { buildNodeIo, probeCli } from './node-io.js';
13
22
  export { SILENT_HOST } from './host.js';
14
23
  export { RETICLE_VERSION, RETICLE_NPM_PACKAGE } from './version.js';
@@ -113,11 +113,13 @@ pointers, not the app.`;
113
113
  import { reticle } from '@reticlehq/vite-plugin';
114
114
 
115
115
  export default defineConfig({
116
- plugins: [${frameworkPluginExample(uiLibrary)}, ${call}],
116
+ plugins: [${call}, ${frameworkPluginExample(uiLibrary)}],
117
117
  });
118
118
 
119
- Keep \`reticle()\` LAST so it sees the output of your other plugins. It only applies during \`vite\`
120
- (dev) — it is dropped from \`vite build\`.${note}`;
119
+ The position in the array does not matter: the plugin declares \`enforce: 'pre'\`, so Vite runs it
120
+ before every normal plugin wherever you put it. Shown first only because that is where \`init\`
121
+ writes it when it patches the config for you. It applies during \`vite\` (dev) only — it is dropped
122
+ from \`vite build\`.${note}`;
121
123
  }
122
124
  /**
123
125
  * The electron-vite recipe: the plugin belongs in `renderer`, never in `main` or `preload`.
@@ -111,6 +111,16 @@ export interface InitResult {
111
111
  ok: boolean;
112
112
  applied: number;
113
113
  manual: number;
114
+ /**
115
+ * The MCP server was registered by THIS run, rather than having been there already.
116
+ *
117
+ * `outcome.mcpRegistered` cannot answer this: it is true for both APPLY and ALREADY, and the two
118
+ * have opposite answers to the only question that matters here — must the agent reading this
119
+ * restart before it can call a `reticle_*` tool. An agent client reads its server list when it
120
+ * STARTS and never re-reads it, so on the run that first registers Reticle on a machine the tools
121
+ * are not in the session that just asked for them.
122
+ */
123
+ mcpNewlyRegistered?: boolean;
114
124
  /** What this run established. Absent only where init exits before establishing anything. */
115
125
  context?: InitContext;
116
126
  /**
package/dist/run.js CHANGED
@@ -441,9 +441,14 @@ continuesToRuntime = false) {
441
441
  for (const line of detail.split('\n'))
442
442
  io.print(` ${line}`);
443
443
  }
444
- else if (detail.length > 0) {
445
- io.print(` ${detail}`);
446
- }
444
+ // Everything else gets its row and nothing more. The detail on a step that needs no decision
445
+ // restates its own title — "reticle already registered with Cursor" under
446
+ // `[·] MCP server (Cursor)` — and a measured Vite first run spent twelve of its forty-six lines
447
+ // that way, six tool names deep, before saying anything about the reader's own app.
448
+ //
449
+ // The ROW stays on every step: `apps/e2e/install-gate.mjs` reads `[mark] title → target` out of
450
+ // this report and diffs the shape against a recorded baseline, so a row that stopped printing
451
+ // would take that guard down with it while looking like tidying.
447
452
  }
448
453
  io.print('');
449
454
  if (connectPending) {
@@ -451,10 +456,20 @@ continuesToRuntime = false) {
451
456
  '"no browser session connected" until then. Everything else is already in place.');
452
457
  io.print('');
453
458
  }
459
+ const mcpStatus = resolvedStatus(plan, MCP_TARGET, failed, skipped);
454
460
  if (!continuesToRuntime) {
455
- io.print(restartHint(resolvedStatus(plan, MCP_TARGET, failed, skipped), devCommand));
461
+ io.print(restartHint(mcpStatus, devCommand));
456
462
  }
457
- return { ok: !connectPending, applied, manual };
463
+ // Carried out even when the hint above was printed, because the RUNTIME path needs the same fact
464
+ // and could not reach it: `restartHint` is only printed when this run stops at the files, and the
465
+ // full run -- the one the installer sends everybody to -- ended by telling an agent to call
466
+ // `reticle_act_and_wait` in a session whose tool list was read before Reticle existed.
467
+ return {
468
+ ok: !connectPending,
469
+ applied,
470
+ manual,
471
+ ...(StepStatus.APPLY === mcpStatus ? { mcpNewlyRegistered: true } : {}),
472
+ };
458
473
  }
459
474
  /**
460
475
  * Perform the apply-step side effects; return the targets whose side effect failed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/init",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Reticle project scaffolder — detects the framework, writes the config, patches the build and registers the MCP server. The build-time half of `reticle init`.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "./package.json": "./package.json"
14
14
  },
15
15
  "dependencies": {
16
- "@reticlehq/core": "3.1.0"
16
+ "@reticlehq/core": "3.2.0"
17
17
  },
18
18
  "license": "FSL-1.1-ALv2",
19
19
  "author": "Reticle contributors",