@imgly/codesign-mcp 0.8.1-next.20261130091621.ge97e02f → 0.9.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 (23) hide show
  1. package/dist/cli/license.js +1 -1
  2. package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
  3. package/node_modules/@imgly/codesign-acp/package.json +2 -2
  4. package/node_modules/@imgly/codesign-agent/package.json +1 -1
  5. package/node_modules/@imgly/codesign-billing/package.json +1 -1
  6. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
  7. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
  8. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
  9. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
  10. package/node_modules/@imgly/codesign-router/package.json +1 -1
  11. package/node_modules/@imgly/codesign-sdk/dist/assets/inline.generated.js +2 -2
  12. package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +1 -1
  13. package/node_modules/@imgly/codesign-sdk/dist/session/remote.js +71 -16
  14. package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +1 -1
  15. package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +1 -1
  16. package/node_modules/@imgly/codesign-sdk/package.json +2 -2
  17. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +2 -2
  18. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
  19. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +2 -2
  20. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
  21. package/node_modules/@imgly/codesign-server/package.json +3 -3
  22. package/node_modules/@imgly/design-lint/package.json +1 -1
  23. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED by scripts/sdk-version.mjs — do not edit.
2
- export const SDK_VERSION = "1.87.0+484bb1f989db";
2
+ export const SDK_VERSION = "1.87.0+f6b0d76b1f90";
3
3
  export const CESDK_VERSION = "1.87.0";
4
4
  //# sourceMappingURL=sdk-version.generated.js.map
@@ -29,6 +29,19 @@ function keptImage(opts, result) {
29
29
  }
30
30
  const unreachable = (message) => new CodesignError({ kind: 'executor_unreachable' }, new Error(message));
31
31
  const sessionClosed = () => new CodesignError({ kind: 'session_closed' }, new Error('the design session is closed'));
32
+ /** The engine process died of a signal on this call (an abort, a segfault): not a stall, a failed start or a lost network. */
33
+ const ENGINE_DIED = /the engine process exited \((SIG[A-Z]+)\)/;
34
+ const engineDeath = (err) => {
35
+ for (let e = err; e instanceof Error; e = e.cause) {
36
+ const signal = ENGINE_DIED.exec(e.message)?.[1];
37
+ if (signal !== undefined)
38
+ return signal;
39
+ }
40
+ return undefined;
41
+ };
42
+ /** Engine deaths in a row, with no rebuild of the design between them that held: it then crashes the engine on load. */
43
+ const CRASHES_TO_STOP = 2;
44
+ const crashesEngine = (signal) => new CodesignError({ kind: 'executor_failed' }, new Error(`this design crashes the CE.SDK engine each time it loads (${signal}, twice in a row), so this session stops loading it again; the saved design is unchanged. Open or load another design to go on.`));
32
45
  const otherVersion = (server, protocol) => new CodesignError({
33
46
  kind: 'executor_version',
34
47
  ...(protocol !== undefined ? { protocol } : {})
@@ -414,6 +427,9 @@ export function remoteExecutors(opts) {
414
427
  let closed = false;
415
428
  /** No engine holds the design: its executor is gone, or the session that replaced it could not be rebuilt. Every call places it again first. */
416
429
  let lost = false;
430
+ /** Engine deaths in a row on this session's design, and the last one's words. */
431
+ let crashes = 0;
432
+ let death = '';
417
433
  /**
418
434
  * Give `placed` the design this engine holds, by the checkpoint key it last held or the scene the runner kept: the
419
435
  * one step a design takes to another executor, on a loss (`recover`).
@@ -456,6 +472,16 @@ export function remoteExecutors(opts) {
456
472
  // becomes the session only once it holds the design again.
457
473
  const recover = async (op, guard, send) => {
458
474
  lost = true;
475
+ // cesdk-workaround: issues/@cesdk/node-native/01a1eaac-b158-7f54-8d2e-5e15ba34d05f_ignorelayout-to-hug-abort — a design that aborts the engine on load is not loaded again.
476
+ const stopped = crashes >= CRASHES_TO_STOP;
477
+ const freshCanvas = op === 'loadKey' ||
478
+ op === 'reset' ||
479
+ op === 'load' ||
480
+ op === 'loadURI';
481
+ if (stopped && !freshCanvas)
482
+ throw crashesEngine(death);
483
+ // After a crash, a load of another design never rebuilds the one that may crash again.
484
+ const skipRebuild = crashes >= 1 && freshCanvas;
459
485
  const moved = await placeWaiting();
460
486
  if (closed) {
461
487
  await drop(moved);
@@ -467,9 +493,10 @@ export function remoteExecutors(opts) {
467
493
  throw new CodesignError({ kind: 'executor_changed' }, new Error('the session moved to an executor that answered differently (its CE.SDK version, abilities or sources), so it ends here rather than change what the model was told or which CE.SDK saves; start the call again'));
468
494
  }
469
495
  // A guarded call and a `settle` need no rebuild: the new engine holds nothing they expect, and says so.
470
- if (guard === undefined && op !== 'settle') {
496
+ if (guard === undefined && op !== 'settle' && !skipRebuild) {
471
497
  try {
472
498
  await rebuildOn(moved);
499
+ crashes = 0;
473
500
  }
474
501
  catch (err) {
475
502
  await drop(moved);
@@ -479,6 +506,21 @@ export function remoteExecutors(opts) {
479
506
  }
480
507
  }
481
508
  session = moved;
509
+ // Not rebuilt: the engine holds the design only once the load that replaces it succeeds.
510
+ if (skipRebuild) {
511
+ let loaded;
512
+ try {
513
+ loaded = await send();
514
+ }
515
+ catch (err) {
516
+ await drop(moved);
517
+ if (closed)
518
+ throw sessionClosed();
519
+ throw err;
520
+ }
521
+ lost = false;
522
+ return loaded;
523
+ }
482
524
  lost = false;
483
525
  if (op === 'settle')
484
526
  throw new StaleEngineError(undefined);
@@ -568,23 +610,36 @@ export function remoteExecutors(opts) {
568
610
  }, signal, long, besides, progress);
569
611
  };
570
612
  let wire;
571
- if (lost)
572
- wire = await recover(op, guard, send);
573
- else
574
- try {
575
- wire = await send();
576
- }
577
- catch (err) {
578
- if (closed)
579
- throw sessionClosed();
580
- const failure = err;
581
- const gone = failure.httpStatus === 404 || isUnreachable(err);
582
- // A `settle` belongs to a load the new session does not have: a lost unnamed one fails; a lost named one
583
- // places the session again and throws StaleEngineError.
584
- if (!gone || (op === 'settle' && given === undefined))
585
- throw err;
613
+ try {
614
+ if (lost)
586
615
  wire = await recover(op, guard, send);
616
+ else
617
+ try {
618
+ wire = await send();
619
+ }
620
+ catch (err) {
621
+ if (closed)
622
+ throw sessionClosed();
623
+ const failure = err;
624
+ const gone = failure.httpStatus === 404 || isUnreachable(err);
625
+ // A `settle` belongs to a load the new session does not have: a lost unnamed one fails; a lost named one
626
+ // places the session again and throws StaleEngineError.
627
+ if (!gone || (op === 'settle' && given === undefined))
628
+ throw err;
629
+ wire = await recover(op, guard, send);
630
+ }
631
+ }
632
+ catch (err) {
633
+ const died = engineDeath(err);
634
+ if (died !== undefined) {
635
+ crashes += 1;
636
+ death = died;
637
+ if (crashes >= CRASHES_TO_STOP && !closed)
638
+ throw crashesEngine(died);
587
639
  }
640
+ throw err;
641
+ }
642
+ crashes = 0;
588
643
  await settleTransfer(besides.transfer, signal);
589
644
  const result = fromWire(wire);
590
645
  if (op === 'execute')
@@ -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 = 129;
6
+ export declare const PROTOCOL = 130;
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 = 129;
7
+ export const PROTOCOL = 130;
8
8
  export const ENGINE_OPS = [
9
9
  'reset',
10
10
  'load',
@@ -99,8 +99,8 @@
99
99
  "prepack": "pnpm run build && pnpm run build:npm && pnpm run api:check"
100
100
  },
101
101
  "dependencies": {
102
- "@imgly/codesign-billing": "0.8.0",
103
- "@imgly/design-lint": "0.8.0"
102
+ "@imgly/codesign-billing": "0.9.0",
103
+ "@imgly/design-lint": "0.9.0"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@arethetypeswrong/cli": "^0.18.5",
@@ -1,6 +1,6 @@
1
1
  export declare const RELEASE_BUILD = true;
2
- export declare const CHANNEL = "next";
2
+ export declare const CHANNEL = "stable";
3
3
  export declare const SENTRY_DSN = "https://10cdfd2ee884954aab53abe5a2878b75@o497090.ingest.us.sentry.io/4512209592909824";
4
- export declare const COMMIT = "53c318d69266b743d6948578e911bbef24a31de0";
4
+ export declare const COMMIT = "e316df70b4f5cb6355d6cbbeaa924295ad8ced01";
5
5
  export declare const KNOB_ENV_HELP = " IMGLY_CESDK_ENGINE engine flavor: wasm | native (default: native,\n falling back to wasm if it cannot start).\n IMGLY_DISABLE_VIEWER on hides the browser viewer; designs are\n delivered as files (default: off).\n IMGLY_TELEMETRY on | off \u2014 usage telemetry (default: on).\n IMGLY_ERROR_REPORTING on | off \u2014 send error reports (crashes, failed\n tool calls) to IMG.LY (default: on).\n IMGLY_PLUGIN_TELEMETRY on | off \u2014 set by earlier Claude plugins' \"Send\n usage data\" setting; off turns usage telemetry\n and error reports off (default: on).\n IMGLY_PLUGIN_ERROR_REPORTING on | off \u2014 set by earlier Claude plugins' \"Send\n error reports\" setting; off turns error reports\n off (default: on).\n IMGLY_GATEWAY_API_KEY AI gateway key; an alternative to signing in\n with the login tool.\n";
6
6
  //# sourceMappingURL=release-flags.generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-flags.generated.d.ts","sourceRoot":"","sources":["../../../src/services/flags/release-flags.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,OAAO,SAAS,CAAC;AAE9B,eAAO,MAAM,UAAU,0FAA0F,CAAC;AAElH,eAAO,MAAM,MAAM,6CAA6C,CAAC;AAGjE,eAAO,MAAM,aAAa,unCAAmmC,CAAC"}
1
+ {"version":3,"file":"release-flags.generated.d.ts","sourceRoot":"","sources":["../../../src/services/flags/release-flags.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,eAAO,MAAM,UAAU,0FAA0F,CAAC;AAElH,eAAO,MAAM,MAAM,6CAA6C,CAAC;AAGjE,eAAO,MAAM,aAAa,unCAAmmC,CAAC"}
@@ -2,11 +2,11 @@
2
2
  // True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.
3
3
  export const RELEASE_BUILD = true;
4
4
  // Build profile: stable | next | canary. See src/services/flags/manifest.ts.
5
- export const CHANNEL = 'next';
5
+ export const CHANNEL = 'stable';
6
6
  // Error-report destination; empty unless a release build was given IMGLY_SENTRY_DSN.
7
7
  export const SENTRY_DSN = "https://10cdfd2ee884954aab53abe5a2878b75@o497090.ingest.us.sentry.io/4512209592909824";
8
8
  // The commit it is built from; empty when it is not known.
9
- export const COMMIT = "53c318d69266b743d6948578e911bbef24a31de0";
9
+ export const COMMIT = "e316df70b4f5cb6355d6cbbeaa924295ad8ced01";
10
10
  // The knob --help text. A release build lists only the honored knobs, so
11
11
  // the frozen names are absent from the published dist, not just unprinted.
12
12
  export const KNOB_ENV_HELP = " IMGLY_CESDK_ENGINE engine flavor: wasm | native (default: native,\n falling back to wasm if it cannot start).\n IMGLY_DISABLE_VIEWER on hides the browser viewer; designs are\n delivered as files (default: off).\n IMGLY_TELEMETRY on | off — usage telemetry (default: on).\n IMGLY_ERROR_REPORTING on | off — send error reports (crashes, failed\n tool calls) to IMG.LY (default: on).\n IMGLY_PLUGIN_TELEMETRY on | off — set by earlier Claude plugins' \"Send\n usage data\" setting; off turns usage telemetry\n and error reports off (default: on).\n IMGLY_PLUGIN_ERROR_REPORTING on | off — set by earlier Claude plugins' \"Send\n error reports\" setting; off turns error reports\n off (default: on).\n IMGLY_GATEWAY_API_KEY AI gateway key; an alternative to signing in\n with the login tool.\n";
@@ -1 +1 @@
1
- {"version":3,"file":"release-flags.generated.js","sourceRoot":"","sources":["../../../src/services/flags/release-flags.generated.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAC9B,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,uFAAuF,CAAC;AAClH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG,0CAA0C,CAAC;AACjE,yEAAyE;AACzE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,gmCAAgmC,CAAC","sourcesContent":["// AUTO-GENERATED by scripts/generate-release-flags.mjs — do not edit.\n// True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.\nexport const RELEASE_BUILD = true;\n// Build profile: stable | next | canary. See src/services/flags/manifest.ts.\nexport const CHANNEL = 'next';\n// Error-report destination; empty unless a release build was given IMGLY_SENTRY_DSN.\nexport const SENTRY_DSN = \"https://10cdfd2ee884954aab53abe5a2878b75@o497090.ingest.us.sentry.io/4512209592909824\";\n// The commit it is built from; empty when it is not known.\nexport const COMMIT = \"53c318d69266b743d6948578e911bbef24a31de0\";\n// The knob --help text. A release build lists only the honored knobs, so\n// the frozen names are absent from the published dist, not just unprinted.\nexport const KNOB_ENV_HELP = \" IMGLY_CESDK_ENGINE engine flavor: wasm | native (default: native,\\n falling back to wasm if it cannot start).\\n IMGLY_DISABLE_VIEWER on hides the browser viewer; designs are\\n delivered as files (default: off).\\n IMGLY_TELEMETRY on | off — usage telemetry (default: on).\\n IMGLY_ERROR_REPORTING on | off — send error reports (crashes, failed\\n tool calls) to IMG.LY (default: on).\\n IMGLY_PLUGIN_TELEMETRY on | off — set by earlier Claude plugins' \\\"Send\\n usage data\\\" setting; off turns usage telemetry\\n and error reports off (default: on).\\n IMGLY_PLUGIN_ERROR_REPORTING on | off — set by earlier Claude plugins' \\\"Send\\n error reports\\\" setting; off turns error reports\\n off (default: on).\\n IMGLY_GATEWAY_API_KEY AI gateway key; an alternative to signing in\\n with the login tool.\\n\";\n"]}
1
+ {"version":3,"file":"release-flags.generated.js","sourceRoot":"","sources":["../../../src/services/flags/release-flags.generated.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,uFAAuF,CAAC;AAClH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG,0CAA0C,CAAC;AACjE,yEAAyE;AACzE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG,gmCAAgmC,CAAC","sourcesContent":["// AUTO-GENERATED by scripts/generate-release-flags.mjs — do not edit.\n// True only when IMGLY_RELEASE_BUILD=true was set at build/publish time.\nexport const RELEASE_BUILD = true;\n// Build profile: stable | next | canary. See src/services/flags/manifest.ts.\nexport const CHANNEL = 'stable';\n// Error-report destination; empty unless a release build was given IMGLY_SENTRY_DSN.\nexport const SENTRY_DSN = \"https://10cdfd2ee884954aab53abe5a2878b75@o497090.ingest.us.sentry.io/4512209592909824\";\n// The commit it is built from; empty when it is not known.\nexport const COMMIT = \"e316df70b4f5cb6355d6cbbeaa924295ad8ced01\";\n// The knob --help text. A release build lists only the honored knobs, so\n// the frozen names are absent from the published dist, not just unprinted.\nexport const KNOB_ENV_HELP = \" IMGLY_CESDK_ENGINE engine flavor: wasm | native (default: native,\\n falling back to wasm if it cannot start).\\n IMGLY_DISABLE_VIEWER on hides the browser viewer; designs are\\n delivered as files (default: off).\\n IMGLY_TELEMETRY on | off — usage telemetry (default: on).\\n IMGLY_ERROR_REPORTING on | off — send error reports (crashes, failed\\n tool calls) to IMG.LY (default: on).\\n IMGLY_PLUGIN_TELEMETRY on | off — set by earlier Claude plugins' \\\"Send\\n usage data\\\" setting; off turns usage telemetry\\n and error reports off (default: on).\\n IMGLY_PLUGIN_ERROR_REPORTING on | off — set by earlier Claude plugins' \\\"Send\\n error reports\\\" setting; off turns error reports\\n off (default: on).\\n IMGLY_GATEWAY_API_KEY AI gateway key; an alternative to signing in\\n with the login tool.\\n\";\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-server",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "private": true,
5
5
  "description": "The CoDesign Server: the design unit's tools, instructions and skills, and the host services (viewer, workspace, sign-in, diagnostics, telemetry, engine).",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -41,8 +41,8 @@
41
41
  "test:video": "vitest --run --config vitest.video.config.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@imgly/codesign-agent": "0.8.0",
45
- "@imgly/codesign-router": "0.8.0",
44
+ "@imgly/codesign-agent": "0.9.0",
45
+ "@imgly/codesign-router": "0.9.0",
46
46
  "@imgly/codesign-sdk": "1.87.0",
47
47
  "@imgly/html-exporter": "0.3.0"
48
48
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/design-lint",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Design linter for CE.SDK scenes: rule engine, diagnostics, safe autofixes.",
5
5
  "private": true,
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/codesign-mcp",
3
- "version": "0.8.1-next.20261130091621.ge97e02f",
3
+ "version": "0.9.0",
4
4
  "description": "A real design engine for your AI agent: generate designs, print-ready PDFs and videos with audio, over MCP.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -100,13 +100,13 @@
100
100
  "@earendil-works/pi-ai": "1.4.0",
101
101
  "@earendil-works/pi-durable": "1.4.0",
102
102
  "@hpcc-js/wasm-zstd": "^1.17.0",
103
- "@imgly/codesign-acp": "0.8.0",
104
- "@imgly/codesign-agent": "0.8.0",
105
- "@imgly/codesign-billing": "0.8.0",
106
- "@imgly/codesign-router": "0.8.0",
103
+ "@imgly/codesign-acp": "0.9.0",
104
+ "@imgly/codesign-agent": "0.9.0",
105
+ "@imgly/codesign-billing": "0.9.0",
106
+ "@imgly/codesign-router": "0.9.0",
107
107
  "@imgly/codesign-sdk": "1.87.0",
108
- "@imgly/codesign-server": "0.8.0",
109
- "@imgly/design-lint": "0.8.0",
108
+ "@imgly/codesign-server": "0.9.0",
109
+ "@imgly/design-lint": "0.9.0",
110
110
  "@imgly/figma-exporter": "0.2.1",
111
111
  "@imgly/figma-importer": "0.2.1",
112
112
  "@imgly/html-exporter": "0.3.0",