@imgly/codesign-mcp 0.7.3-next.20261125154156.gf18fd43 → 0.8.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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/license.js +1 -1
  3. package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
  4. package/node_modules/@imgly/codesign-acp/package.json +2 -2
  5. package/node_modules/@imgly/codesign-agent/package.json +1 -1
  6. package/node_modules/@imgly/codesign-billing/package.json +1 -1
  7. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
  8. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
  9. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
  10. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
  11. package/node_modules/@imgly/codesign-router/package.json +1 -1
  12. package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.js +61 -14
  13. package/node_modules/@imgly/codesign-sdk/dist/host.d.ts +1 -1
  14. package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +1 -1
  15. package/node_modules/@imgly/codesign-sdk/dist/session/local-engine-session.js +1 -1
  16. package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +1 -1
  17. package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +1 -1
  18. package/node_modules/@imgly/codesign-sdk/dist/tools/preview.js +13 -7
  19. package/node_modules/@imgly/codesign-sdk/package.json +2 -2
  20. package/node_modules/@imgly/codesign-server/dist/design/host.d.ts.map +1 -1
  21. package/node_modules/@imgly/codesign-server/dist/design/host.js +2 -3
  22. package/node_modules/@imgly/codesign-server/dist/design/host.js.map +1 -1
  23. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +2 -2
  24. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
  25. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +2 -2
  26. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
  27. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.d.ts +7 -1
  28. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.d.ts.map +1 -1
  29. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js +58 -3
  30. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js.map +1 -1
  31. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-reporter.d.ts +0 -2
  32. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-reporter.d.ts.map +1 -1
  33. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-reporter.js +10 -55
  34. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-reporter.js.map +1 -1
  35. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts +8 -0
  36. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts.map +1 -1
  37. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js +7 -0
  38. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js.map +1 -1
  39. package/node_modules/@imgly/codesign-server/package.json +3 -3
  40. package/node_modules/@imgly/design-lint/package.json +1 -1
  41. package/package.json +7 -7
package/README.md CHANGED
@@ -187,7 +187,7 @@ with IMG.LY and reports its own usage to IMG.LY when it starts; no switch,
187
187
 
188
188
  ### Usage data
189
189
 
190
- Published builds send IMG.LY one event per tool call: when it happened, the tool's name, whether it succeeded, how long it took, the error code when it failed, the MCP client's name and version, the server version, OS and architecture, the engine type, how the client connects, a few fixed details of the call such as the export format and, on failure, a short error detail, counters that number repeats and order the events, an id for this run of the server, an id for this machine and, when you are signed in, your account id and that you are. Never your prompts, the code the model ran, what a tool returned, or your files. Nothing is sent when `IMGLY_TELEMETRY=off`. Events that could not be sent yet wait in `~/.codesign/telemetry/` (up to 500; on macOS and Linux readable only by you) for a later run; turning telemetry off does not delete them, so delete that folder if you want them gone.
190
+ Published builds send IMG.LY one event per tool call: when it happened, the tool's name, whether it succeeded, how long it took, the error code when it failed, the MCP client's name and version, the server version, OS and architecture, the engine type, how the client connects, a few fixed details of the call such as the export format and, on failure, a short error detail, whose fault it was (CoDesign's, the engine's or the model's) and whether a listed rule or a fallback decided that, counters that number repeats and order the events, an id for this run of the server, an id for this machine and, when you are signed in, your account id and that you are. Never your prompts, the code the model ran, what a tool returned, or your files. Nothing is sent when `IMGLY_TELEMETRY=off`. Events that could not be sent yet wait in `~/.codesign/telemetry/` (up to 500; on macOS and Linux readable only by you) for a later run; turning telemetry off does not delete them, so delete that folder if you want them gone.
191
191
 
192
192
  ## Command line
193
193
 
@@ -1,3 +1,3 @@
1
1
  // Empty in every build, so the build is the same on every machine; scripts/pack-release.mjs bakes the release licence.
2
- export const IMGLY_CESDK_LICENSE = "v8gCwX_fDCYEgHzpoBDvzkeTYruyoYPYvdbWTM5p75CFazS9fZ-XnkVRrgbuORqF";
2
+ export const IMGLY_CESDK_LICENSE = "NPmLoxSh49hXl9EPtSyNbUpkJkv5IRH8tgjE6AC_Eb0Et4QffL1NPMRkLVkg5cfc";
3
3
  //# sourceMappingURL=license.js.map
@@ -1,5 +1,5 @@
1
1
  //#region ../codesign-router/dist/release-build.generated.js
2
- const CHANNEL = "next";
2
+ const CHANNEL = "stable";
3
3
 
4
4
  //#endregion
5
5
  export { CHANNEL };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-acp",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "private": true,
5
5
  "description": "`cdsn acp`: CoDesign as an ACP agent over stdio, for editors that speak the Agent Client Protocol; each ACP session is a chat of the CoDesign Server.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,7 +25,7 @@
25
25
  "test": "vitest --run"
26
26
  },
27
27
  "dependencies": {
28
- "@imgly/codesign-router": "0.7.2"
28
+ "@imgly/codesign-router": "0.8.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@imgly/codesign-server": "workspace:*",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-agent",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "private": true,
5
5
  "description": "The `codesign` chat agent: pi-durable with CoDesign's tools and models through the IMG.LY AI gateway, for any host.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-billing",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "How a CoDesign render is charged: the facts Metering prices, and the claim, confirm and cancel that bill it.",
5
5
  "private": true,
6
6
  "type": "module",
@@ -1,3 +1,3 @@
1
1
  export declare const RELEASE_BUILD = true;
2
- export declare const CHANNEL = "next";
2
+ export declare const CHANNEL = "stable";
3
3
  //# sourceMappingURL=release-build.generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-build.generated.d.ts","sourceRoot":"","sources":["../src/release-build.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,OAAO,SAAS,CAAC"}
1
+ {"version":3,"file":"release-build.generated.d.ts","sourceRoot":"","sources":["../src/release-build.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,OAAO,WAAW,CAAC"}
@@ -2,5 +2,5 @@
2
2
  // True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.
3
3
  export const RELEASE_BUILD = true;
4
4
  // The channel it is built for: stable | next | canary.
5
- export const CHANNEL = 'next';
5
+ export const CHANNEL = 'stable';
6
6
  //# sourceMappingURL=release-build.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-build.generated.js","sourceRoot":"","sources":["../src/release-build.generated.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC","sourcesContent":["// AUTO-GENERATED by scripts/generate-release-build.mjs — do not edit.\n// True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.\nexport const RELEASE_BUILD = true;\n// The channel it is built for: stable | next | canary.\nexport const CHANNEL = 'next';\n"]}
1
+ {"version":3,"file":"release-build.generated.js","sourceRoot":"","sources":["../src/release-build.generated.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,uDAAuD;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// AUTO-GENERATED by scripts/generate-release-build.mjs — do not edit.\n// True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.\nexport const RELEASE_BUILD = true;\n// The channel it is built for: stable | next | canary.\nexport const CHANNEL = 'stable';\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-router",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "private": true,
5
5
  "description": "The CoDesign router: the server protocol, the router process, unit lifecycle and the installer. Node built-ins only.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -2,10 +2,11 @@
2
2
  import { chargeOf, checkRenderId, createLedger, ExportRefusal, isBilled } from '@imgly/codesign-billing';
3
3
  import { base64ToBytes } from '../../bytes.js';
4
4
  import { imageSizeOf } from '../../formats/image-size.js';
5
- import { mediaFacts } from '../../formats/media-sniff.js';
5
+ import { detectMedia, mediaFacts } from '../../formats/media-sniff.js';
6
6
  import { CodesignError, isCodesignError } from '../../host.js';
7
7
  import { PREVIEW_EDGE_PX, PREVIEW_MAX_DIMENSION_PX, PREVIEW_MAX_PIXELS } from '../../host/preview-size.js';
8
8
  import { formatSpec } from '../../tools/export-formats/table.js';
9
+ import { unshownReturn } from '../../tools/result.js';
9
10
  import { exportTooLarge, putExport } from '../../session/export-upload.js';
10
11
  import { AFTER_ENGINE } from '../../session/guarded-engine-session.js';
11
12
  import { checkFile } from './check.js';
@@ -93,14 +94,19 @@ function metered(inner, opts) {
93
94
  },
94
95
  async execute(code, o) {
95
96
  const edit = await inner.execute(code, o);
96
- // The code's own image parts too: otherwise it could return a full-size render as one.
97
- for (const image of [
98
- ...(edit.render !== undefined ? [edit.render] : []),
99
- ...edit.parts.filter((part) => part.type === 'image')
100
- ]) {
101
- checkPreview(base64ToBytes(image.data), image.mimeType);
102
- }
103
- return edit;
97
+ if (edit.render !== undefined)
98
+ checkPreview(base64ToBytes(edit.render.data), edit.render.mimeType);
99
+ // The code's own images too, or it could return a full-size render as one; the edit is saved, so a refused one becomes a note.
100
+ const parts = edit.parts.map((part) => {
101
+ if (part.type !== 'image')
102
+ return part;
103
+ const bytes = base64ToBytes(part.data);
104
+ const problem = previewProblem(bytes, part.mimeType);
105
+ return problem === undefined
106
+ ? part
107
+ : unshownReturn(new Error(returnedImageNote(problem, part.mimeType, bytes)));
108
+ });
109
+ return { ...edit, parts };
104
110
  },
105
111
  async preview(o) {
106
112
  const batch = await inner.preview(o);
@@ -255,20 +261,61 @@ function thumbnailEdge(asked) {
255
261
  const PREVIEW_TYPES = new Set(['image/png', 'image/jpeg', 'image/webp']);
256
262
  /** Refuses an image larger than any preview: otherwise a forged preview would deliver a full-size render for free. */
257
263
  function checkPreview(bytes, mimeType) {
264
+ const problem = previewProblem(bytes, mimeType);
265
+ if (problem === undefined)
266
+ return;
267
+ const what = problem.kind === 'type'
268
+ ? mimeType
269
+ : problem.kind === 'size'
270
+ ? `${problem.width}×${problem.height}`
271
+ : `${problem.bytes}-byte`;
272
+ throw new Error(`the engine returned a ${what} preview`);
273
+ }
274
+ function previewProblem(bytes, mimeType) {
258
275
  const size = PREVIEW_TYPES.has(mimeType)
259
276
  ? imageSizeOf(bytes, mimeType)
260
277
  : undefined;
261
- if (size === undefined) {
262
- throw new Error(`the engine returned a ${mimeType} preview`);
263
- }
278
+ if (size === undefined)
279
+ return { kind: 'type' };
264
280
  const { width, height } = size;
265
281
  if (Math.max(width, height) > PREVIEW_MAX_DIMENSION_PX ||
266
282
  width * height > PREVIEW_MAX_PIXELS) {
267
- throw new Error(`the engine returned a ${width}×${height} preview`);
283
+ return { kind: 'size', width, height };
268
284
  }
269
285
  // Bytes past what its pixels can take: a file hidden in a chunk or after the image.
270
286
  if (bytes.byteLength > width * height * 4 + 64 * 1024) {
271
- throw new Error(`the engine returned a ${bytes.byteLength}-byte preview`);
287
+ return { kind: 'bytes', bytes: bytes.byteLength, width, height };
272
288
  }
289
+ return undefined;
290
+ }
291
+ function returnedImageNote(problem, mimeType, bytes) {
292
+ const sniffed = detectMedia(bytes)?.mime;
293
+ const [why, remedy] = problem.kind === 'size'
294
+ ? [
295
+ `is ${problem.width}×${problem.height}, more than the ${PREVIEW_MAX_DIMENSION_PX} px a side and 512×512 px of area the model is shown`,
296
+ 'return a smaller image (engine.block.export with both targetWidth and targetHeight)'
297
+ ]
298
+ : problem.kind === 'bytes'
299
+ ? [
300
+ `has ${problem.bytes} bytes, more than a ${problem.width}×${problem.height} image holds`,
301
+ "return only the image's bytes"
302
+ ]
303
+ : sniffed !== undefined &&
304
+ sniffed !== mimeType &&
305
+ PREVIEW_TYPES.has(sniffed)
306
+ ? [
307
+ `is labelled ${mimeType}, and its bytes are ${sniffed}`,
308
+ 'label the image with its real type'
309
+ ]
310
+ : !PREVIEW_TYPES.has(sniffed ?? mimeType)
311
+ ? [
312
+ `is ${sniffed ?? mimeType}; the model is shown only a PNG, JPEG or WebP`,
313
+ 'return a PNG, JPEG or WebP'
314
+ ]
315
+ : [
316
+ `is labelled ${mimeType}, and its bytes are not a readable image`,
317
+ 'return a PNG, JPEG or WebP'
318
+ ];
319
+ return `The image it returned ${why}. Use \`preview\` to see a design, or ${remedy}.`;
273
320
  }
274
321
  //# sourceMappingURL=metered.js.map
@@ -121,7 +121,7 @@ export type HostFailure = DesignChange
121
121
  time: number;
122
122
  duration: number;
123
123
  }
124
- /** `time` was asked of a block that has no timeline (one outside every page). */
124
+ /** A seek, by `time` or a Video scene's preview, of a block with no timeline (one outside every page). */
125
125
  | {
126
126
  kind: 'no_timeline';
127
127
  blockId: number;
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED by scripts/sdk-version.mjs — do not edit.
2
- export const SDK_VERSION = "1.86.0+07ada83e1518";
2
+ export const SDK_VERSION = "1.86.0+63441e999b8d";
3
3
  export const CESDK_VERSION = "1.86.2";
4
4
  //# sourceMappingURL=sdk-version.generated.js.map
@@ -1523,7 +1523,7 @@ export function createEngineSession(target, opts = {}) {
1523
1523
  }
1524
1524
  }
1525
1525
  catch (err) {
1526
- if (time !== undefined && !engine.block.supportsDuration(target)) {
1526
+ if (!engine.block.supportsDuration(target)) {
1527
1527
  return {
1528
1528
  blockId,
1529
1529
  failure: new CodesignError({ kind: 'no_timeline', blockId: target })
@@ -3,7 +3,7 @@ import { type LocalGlyphs } from '../engine/scene-file-uri-guard.js';
3
3
  import { type HostFailure } from '../host.js';
4
4
  import type { EngineSession } from './engine-session.js';
5
5
  /** Bumped on any wire shape change; mismatched peers never open a session. */
6
- export declare const PROTOCOL = 121;
6
+ export declare const PROTOCOL = 123;
7
7
  /** The engine-session calls a remote session can make, by name. */
8
8
  export type EngineOp = Exclude<keyof EngineSession, 'cesdkVersion' | 'handshake' | 'close' | 'loadProgress'>;
9
9
  export declare const ENGINE_OPS: readonly EngineOp[];
@@ -4,7 +4,7 @@ import { DESIGN_ERROR_CODES, DESIGN_OPS, designErrorFacts, markDesignError } fro
4
4
  import { SceneFileUriError } from '../engine/scene-file-uri-guard.js';
5
5
  import { CodesignError } from '../host.js';
6
6
  /** Bumped on any wire shape change; mismatched peers never open a session. */
7
- export const PROTOCOL = 121;
7
+ export const PROTOCOL = 123;
8
8
  export const ENGINE_OPS = [
9
9
  'reset',
10
10
  'load',
@@ -353,7 +353,7 @@ function renderErrorResult(blocks, err) {
353
353
  };
354
354
  }
355
355
  /** Word one block's failure, and say which error code it counts as. */
356
- function blockFailureText(outcome) {
356
+ function blockFailureText(outcome, timed) {
357
357
  const { failure, cause } = outcome.failure;
358
358
  if (failure.kind === 'unknown_block') {
359
359
  return {
@@ -377,11 +377,17 @@ function blockFailureText(outcome) {
377
377
  };
378
378
  }
379
379
  if (failure.kind === 'no_timeline') {
380
- return {
381
- text: `preview: block ${failure.blockId} has no timeline, so \`time\` cannot seek it. Pass a page id (or a block that sits on a page) in \`blockIds\`, or omit \`time\`.`,
382
- code: 'bad_args',
383
- detail: 'time.no_timeline'
384
- };
380
+ return timed
381
+ ? {
382
+ text: `preview: block ${failure.blockId} has no timeline, so \`time\` cannot seek it. Pass a page id (or a block that sits on a page) in \`blockIds\`, or omit \`time\` (in a Design scene).`,
383
+ code: 'bad_args',
384
+ detail: 'time.no_timeline'
385
+ }
386
+ : {
387
+ text: `preview: block ${failure.blockId} has no timeline, so a Video scene cannot preview it. Pass a page id (or a block that sits on a page) in \`blockIds\`.`,
388
+ code: 'bad_args',
389
+ detail: 'video.no_timeline'
390
+ };
385
391
  }
386
392
  if (failure.kind === 'region_not_on_page') {
387
393
  return {
@@ -663,7 +669,7 @@ export function createPreviewTool(opts) {
663
669
  }
664
670
  return;
665
671
  }
666
- const worded = blockFailureText(outcome);
672
+ const worded = blockFailureText(outcome, args.time !== undefined);
667
673
  if (firstFailure === undefined) {
668
674
  firstFailure = worded.code;
669
675
  firstDetail = worded.detail;
@@ -95,8 +95,8 @@
95
95
  "prepack": "pnpm run build && pnpm run build:npm && pnpm run api:check"
96
96
  },
97
97
  "dependencies": {
98
- "@imgly/codesign-billing": "0.7.2",
99
- "@imgly/design-lint": "0.7.2"
98
+ "@imgly/codesign-billing": "0.8.0",
99
+ "@imgly/design-lint": "0.8.0"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@arethetypeswrong/cli": "^0.18.5",
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRo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,CAAC;IACf,+GAA+G;IAC/G,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,sGAAsG;IACtG,aAAa,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpD,gGAAgG;IAChG,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,iFAAiF;IACjF,SAAS,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8HAA8H;IAC9H,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,oDAUtE;AAED,yGAAyG;AACzG,wBAAsB,cAAc,CAClC,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,SAAS,CAAC,CAo3BpB"}
@@ -16,7 +16,6 @@
16
16
  // human-facing (errors, progress) goes to stderr.
17
17
  import { libraryHealth, manifestFacts } from '../services/workspace/library-health.js';
18
18
  import { randomUUID } from 'node:crypto';
19
- import { fileURLToPath } from 'node:url';
20
19
  import { basename, dirname, join as joinPath, resolve as resolvePath } from 'node:path';
21
20
  import { loadNodeAssets } from '../services/assets/load-node.js';
22
21
  import { errorReportingEnabled, placeholderNotices, sentryDsn, usageTelemetryEnabled, viewerDisabled } from '../services/flags/index.js';
@@ -32,7 +31,7 @@ import { packUseCounter } from '../services/telemetry/pack-events.js';
32
31
  import { crashHandler } from '../services/telemetry/process-events.js';
33
32
  import { TelemetrySpool } from '../services/telemetry/spool.js';
34
33
  import { ErrorReporter, createSentrySend, setProcessReporter } from '../services/telemetry/error-reporter.js';
35
- import { thrownByModel } from '../services/telemetry/error-policy.js';
34
+ import { ourPackageRoot, thrownByModel } from '../services/telemetry/error-policy.js';
36
35
  import { engineFallbackStack, engineFallbackWarning } from '../catalog/tools/engine.js';
37
36
  import { HarnessContext, harnessFromEnv } from '../services/telemetry/harness-context.js';
38
37
  import { withTelemetryCovered } from '../catalog/tools/telemetry-wrapper.js';
@@ -193,7 +192,7 @@ export async function buildLocalHost(opts) {
193
192
  try {
194
193
  errorReporter = new ErrorReporter({
195
194
  send: await createSentrySend(dsn),
196
- packageRoot: fileURLToPath(new URL('../..', import.meta.url)).replace(/[\\/]$/, ''),
195
+ packageRoot: ourPackageRoot(),
197
196
  context: {
198
197
  platform: () => process.platform,
199
198
  arch: () => process.arch,