@cotal-ai/connector-jcode 0.77.0 → 0.77.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.
package/dist/index.js CHANGED
@@ -197,6 +197,9 @@ function materialEnv(opts) {
197
197
  return {};
198
198
  return { [LAUNCH_MATERIAL_ENV3]: writeLaunchMaterial(material) };
199
199
  }
200
+ function launchArmsEvents(opts) {
201
+ return opts.events !== false || opts.eventsRequired === true;
202
+ }
200
203
 
201
204
  // ../connector-core/dist/agui.js
202
205
  import { AGUI_FRAME_KIND, AGUI_EVENT_TYPE, isAguiFramePart } from "@cotal-ai/core";
@@ -15855,7 +15858,7 @@ var jcodeConnector = {
15855
15858
  if (opts.acceptedToken) env.COTAL_ACCEPTED_TOKEN = opts.acceptedToken;
15856
15859
  const tui = process.env.COTAL_JCODE_TUI?.trim();
15857
15860
  if (tui) env.COTAL_JCODE_TUI = tui;
15858
- if (opts.events !== false) {
15861
+ if (launchArmsEvents(opts)) {
15859
15862
  if (!opts.workspaceRoot)
15860
15863
  throw new Error("jcode connector: events require a workspace root for durable AG-UI state");
15861
15864
  env.COTAL_EVENTS = "1";