@askalf/dario 5.5.53 → 5.5.54

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.
@@ -289,6 +289,22 @@ export type PreservedToolReason = 'platform' | 'interactive' | 'config-scoped';
289
289
  * regression).
290
290
  */
291
291
  export declare function preservedToolReason(name: string, platform: string): PreservedToolReason | null;
292
+ /**
293
+ * Names the fallback bundle carries that `captureTools` lacks and NO
294
+ * preservation set classifies. Empty on every capture measured so far
295
+ * (win32 + linux, CC 2.1.236 and 2.1.241 — dario#1062's report did not
296
+ * reproduce), but the roster is remote-config-shaped: the config-scoped four
297
+ * flipped between the 8/11 and 8/15 bakes, and WaitForMcpServers appeared in
298
+ * one capture and vanished in the next, minutes apart, same binary. So the
299
+ * day this goes non-empty must be LOUD, not a silent shrink of
300
+ * CC_NATIVE_NAMES_UNION: capture-and-bake refuses to write the bundle, and
301
+ * the live path logs it. Note the win32 subtlety: a win32-only tool missing
302
+ * from a WIN32 capture is unclassified (it was expected there) — that is a
303
+ * real drop, not a platform artifact.
304
+ */
305
+ export declare function unclassifiedToolDrops<T extends {
306
+ name: string;
307
+ }>(captureTools: T[], fallbackTools: T[], platform: string): string[];
292
308
  /**
293
309
  * Re-union `capture.tools` with any tool `fallback` carries that the capture is
294
310
  * required to keep (see preservedToolReason). Returns the merged tool array,
@@ -241,6 +241,25 @@ export function preservedToolReason(name, platform) {
241
241
  return 'config-scoped';
242
242
  return null;
243
243
  }
244
+ /**
245
+ * Names the fallback bundle carries that `captureTools` lacks and NO
246
+ * preservation set classifies. Empty on every capture measured so far
247
+ * (win32 + linux, CC 2.1.236 and 2.1.241 — dario#1062's report did not
248
+ * reproduce), but the roster is remote-config-shaped: the config-scoped four
249
+ * flipped between the 8/11 and 8/15 bakes, and WaitForMcpServers appeared in
250
+ * one capture and vanished in the next, minutes apart, same binary. So the
251
+ * day this goes non-empty must be LOUD, not a silent shrink of
252
+ * CC_NATIVE_NAMES_UNION: capture-and-bake refuses to write the bundle, and
253
+ * the live path logs it. Note the win32 subtlety: a win32-only tool missing
254
+ * from a WIN32 capture is unclassified (it was expected there) — that is a
255
+ * real drop, not a platform artifact.
256
+ */
257
+ export function unclassifiedToolDrops(captureTools, fallbackTools, platform) {
258
+ const have = new Set(captureTools.map((t) => t.name));
259
+ return fallbackTools
260
+ .filter((t) => !have.has(t.name) && preservedToolReason(t.name, platform) === null)
261
+ .map((t) => t.name);
262
+ }
244
263
  /**
245
264
  * Re-union `capture.tools` with any tool `fallback` carries that the capture is
246
265
  * required to keep (see preservedToolReason). Returns the merged tool array,
@@ -345,6 +364,16 @@ function withPreservedTools(live, options) {
345
364
  return live; // bundle unreadable — the capture is still better than throwing
346
365
  }
347
366
  const { tools, preserved } = mergePreservedTools(live.tools, bundled.tools, process.platform);
367
+ // A tool the capture omitted that NO set classifies stays out of the merge
368
+ // (nothing here invents wire shape) — but silence is how that class of rot
369
+ // ships, so say it every load. A client declaring one of these will not
370
+ // identity-map and lands in the unmapped round-robin (the v4.8.93 mode).
371
+ const unclassified = unclassifiedToolDrops(live.tools, bundled.tools, process.platform);
372
+ if (unclassified.length > 0 && !options?.silent) {
373
+ console.warn(`[dario] live template: this capture omitted ${unclassified.length} tool${unclassified.length === 1 ? '' : 's'} no preservation set classifies — ` +
374
+ `NOT restored, clients declaring them will not identity-map: ${unclassified.join(', ')}. ` +
375
+ 'Please report this at dario#1062 with your `claude --version`.');
376
+ }
348
377
  if (preserved.length === 0)
349
378
  return live;
350
379
  if (!options?.silent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "5.5.53",
3
+ "version": "5.5.54",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {