@cotal-ai/connector-jcode 0.70.1 → 0.71.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.
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV2,
36
36
  import { LAUNCH_MATERIAL_ENV, readLaunchMaterial } from "@cotal-ai/core/launch-material";
37
37
 
38
38
  // ../connector-core/dist/agent.js
39
- import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, controlReplyFrom, runAgentBearer, partsToText, routeToken } from "@cotal-ai/core";
39
+ import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, controlReplyFrom, runAgentBearer, partsToText, assertValidRole } from "@cotal-ai/core";
40
40
 
41
41
  // ../connector-core/dist/framing.js
42
42
  import { peerLabel } from "@cotal-ai/core";
@@ -130,6 +130,11 @@ var OPERATOR_ENV_KEEP = [
130
130
  "COTAL_ORCA_BIN"
131
131
  ];
132
132
  function launchEnv(opts = {}) {
133
+ for (const k of opts.envAllow ?? []) {
134
+ const name = k.toUpperCase();
135
+ if (name.startsWith("COTAL_") && !OPERATOR_ENV_KEEP.some((keep) => keep === name))
136
+ throw new Error(`spawn.env cannot list "${k}": the launcher sets COTAL_ names for each seat, and only the machine-wide ones such as COTAL_HOME cross from the spawning process`);
137
+ }
133
138
  const env = {};
134
139
  const sourceKey = /* @__PURE__ */ new Map();
135
140
  for (const k of Object.keys(process.env))
@@ -15864,12 +15869,7 @@ var jcodeConnector = {
15864
15869
  }
15865
15870
  if (opts.configPath) env.COTAL_AGENT_FILE = resolve(opts.configPath);
15866
15871
  if (opts.model) env.COTAL_MODEL = opts.model;
15867
- if (opts.variant !== void 0) {
15868
- const variant = opts.variant.trim();
15869
- if (!variant)
15870
- throw new Error("jcode connector: a model variant was given but it is empty \u2014 there is no reasoning effort to select");
15871
- env.COTAL_VARIANT = variant;
15872
- }
15872
+ if (opts.variant) env.COTAL_VARIANT = opts.variant;
15873
15873
  const launchOptions = connectorLaunchOptions("jcode", opts.launchOptions);
15874
15874
  if (launchOptions.length)
15875
15875
  throw new Error(