@signetai/connector-codex 0.163.17 → 0.163.19

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAIpB,MAAM,wBAAwB,CAAC;AAQhC,MAAM,MAAM,eAAe,GACxB;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC9D;IACA,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD,CAAC;AAWL,UAAU,uBAAuB;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,UAAU,yBAAyB;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6FD,wBAAgB,uBAAuB,CACtC,QAAQ,GAAE,SAAS,MAAM,EAA4B,EACrD,QAAQ,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAA6B,GACvD,MAAM,GAAG,IAAI,CAQf;AAkJD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC,GAAG,uBAAuB,CAe1B;AA6ZD,wBAAgB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAuB1D;AA8HD,qBAAa,cAAe,SAAQ,aAAa;IAChD,QAAQ,CAAC,IAAI,WAAW;IACxB,QAAQ,CAAC,SAAS,WAAW;IAE7B,SAAS,CAAC,YAAY,IAAI,MAAM;IAIhC,SAAS,CAAC,uBAAuB,IAAI,SAAS,MAAM,EAAE;IAItD,SAAS,CAAC,uBAAuB,IAAI,MAAM,GAAG,IAAI;IAIlD,SAAS,CAAC,2BAA2B,IAAI,OAAO;IAShD,SAAS,CAAC,yBAAyB,IAAI,OAAO;IAI9C,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB;IAoB3E,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAOrD,OAAO,CAAC,gBAAgB;IAIxB,aAAa,IAAI,MAAM;IAIvB,OAAO,CAAC,yBAAyB;IA4CjC,OAAO,CAAC,wBAAwB;IAkC1B,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAqGjD,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IA2D3C,WAAW,IAAI,OAAO;CAgBtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAOpB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,MAAM,eAAe,GACxB;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC9D;IACA,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD,CAAC;AAWL,UAAU,uBAAuB;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,UAAU,yBAAyB;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;AAgFD,wBAAgB,uBAAuB,CACtC,QAAQ,GAAE,SAAS,MAAM,EAA4B,EACrD,QAAQ,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAA6B,GACvD,MAAM,GAAG,IAAI,CAQf;AAkJD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC,GAAG,uBAAuB,CAe1B;AA6ZD,wBAAgB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAuB1D;AA8HD,qBAAa,cAAe,SAAQ,aAAa;IAChD,QAAQ,CAAC,IAAI,WAAW;IACxB,QAAQ,CAAC,SAAS,WAAW;IAE7B,SAAS,CAAC,YAAY,IAAI,MAAM;IAIhC,SAAS,CAAC,uBAAuB,IAAI,SAAS,MAAM,EAAE;IAItD,SAAS,CAAC,uBAAuB,IAAI,MAAM,GAAG,IAAI;IAIlD,SAAS,CAAC,2BAA2B,IAAI,OAAO;IAShD,SAAS,CAAC,yBAAyB,IAAI,OAAO;IAI9C,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB;IAoB3E,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAOrD,OAAO,CAAC,gBAAgB;IAIxB,aAAa,IAAI,MAAM;IAIvB,OAAO,CAAC,yBAAyB;IA4CjC,OAAO,CAAC,wBAAwB;IAkC1B,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAqGjD,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IA2D3C,WAAW,IAAI,OAAO;CAgBtB"}
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { basename as basename3, dirname as dirname5, join as join4 } from "node:
8
8
  // ../../../libs/connector-base/dist/index.js
9
9
  import { randomBytes } from "node:crypto";
10
10
  import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
11
- import { dirname as dirname3, join as join3 } from "node:path";
11
+ import { dirname as dirname3, isAbsolute, join as join3, relative, sep } from "node:path";
12
12
  import { createRequire } from "node:module";
13
13
  import { dirname, join } from "node:path";
14
14
  import { fileURLToPath } from "node:url";
@@ -3626,10 +3626,10 @@ var require_resolve_block_map = __commonJS2((exports) => {
3626
3626
  let offset = bm.offset;
3627
3627
  let commentEnd = null;
3628
3628
  for (const collItem of bm.items) {
3629
- const { start, key, sep, value } = collItem;
3629
+ const { start, key, sep: sep2, value } = collItem;
3630
3630
  const keyProps = resolveProps.resolveProps(start, {
3631
3631
  indicator: "explicit-key-ind",
3632
- next: key ?? sep?.[0],
3632
+ next: key ?? sep2?.[0],
3633
3633
  offset,
3634
3634
  onError,
3635
3635
  parentIndent: bm.indent,
@@ -3643,7 +3643,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3643
3643
  else if ("indent" in key && key.indent !== bm.indent)
3644
3644
  onError(offset, "BAD_INDENT", startColMsg);
3645
3645
  }
3646
- if (!keyProps.anchor && !keyProps.tag && !sep) {
3646
+ if (!keyProps.anchor && !keyProps.tag && !sep2) {
3647
3647
  commentEnd = keyProps.end;
3648
3648
  if (keyProps.comment) {
3649
3649
  if (map.comment)
@@ -3668,7 +3668,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3668
3668
  ctx.atKey = false;
3669
3669
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
3670
3670
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
3671
- const valueProps = resolveProps.resolveProps(sep ?? [], {
3671
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
3672
3672
  indicator: "map-value-ind",
3673
3673
  next: value,
3674
3674
  offset: keyNode.range[2],
@@ -3684,7 +3684,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3684
3684
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
3685
3685
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
3686
3686
  }
3687
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
3687
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
3688
3688
  if (ctx.schema.compat)
3689
3689
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
3690
3690
  offset = valueNode.range[2];
@@ -3766,7 +3766,7 @@ var require_resolve_end = __commonJS2((exports) => {
3766
3766
  let comment = "";
3767
3767
  if (end) {
3768
3768
  let hasSpace = false;
3769
- let sep = "";
3769
+ let sep2 = "";
3770
3770
  for (const token of end) {
3771
3771
  const { source, type } = token;
3772
3772
  switch (type) {
@@ -3780,13 +3780,13 @@ var require_resolve_end = __commonJS2((exports) => {
3780
3780
  if (!comment)
3781
3781
  comment = cb;
3782
3782
  else
3783
- comment += sep + cb;
3784
- sep = "";
3783
+ comment += sep2 + cb;
3784
+ sep2 = "";
3785
3785
  break;
3786
3786
  }
3787
3787
  case "newline":
3788
3788
  if (comment)
3789
- sep += source;
3789
+ sep2 += source;
3790
3790
  hasSpace = true;
3791
3791
  break;
3792
3792
  default:
@@ -3824,18 +3824,18 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3824
3824
  let offset = fc.offset + fc.start.source.length;
3825
3825
  for (let i = 0;i < fc.items.length; ++i) {
3826
3826
  const collItem = fc.items[i];
3827
- const { start, key, sep, value } = collItem;
3827
+ const { start, key, sep: sep2, value } = collItem;
3828
3828
  const props = resolveProps.resolveProps(start, {
3829
3829
  flow: fcName,
3830
3830
  indicator: "explicit-key-ind",
3831
- next: key ?? sep?.[0],
3831
+ next: key ?? sep2?.[0],
3832
3832
  offset,
3833
3833
  onError,
3834
3834
  parentIndent: fc.indent,
3835
3835
  startOnNewline: false
3836
3836
  });
3837
3837
  if (!props.found) {
3838
- if (!props.anchor && !props.tag && !sep && !value) {
3838
+ if (!props.anchor && !props.tag && !sep2 && !value) {
3839
3839
  if (i === 0 && props.comma)
3840
3840
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
3841
3841
  else if (i < fc.items.length - 1)
@@ -3887,8 +3887,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3887
3887
  }
3888
3888
  }
3889
3889
  }
3890
- if (!isMap && !sep && !props.found) {
3891
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);
3890
+ if (!isMap && !sep2 && !props.found) {
3891
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
3892
3892
  coll.items.push(valueNode);
3893
3893
  offset = valueNode.range[2];
3894
3894
  if (isBlock(value))
@@ -3900,7 +3900,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3900
3900
  if (isBlock(key))
3901
3901
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
3902
3902
  ctx.atKey = false;
3903
- const valueProps = resolveProps.resolveProps(sep ?? [], {
3903
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
3904
3904
  flow: fcName,
3905
3905
  indicator: "map-value-ind",
3906
3906
  next: value,
@@ -3911,8 +3911,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3911
3911
  });
3912
3912
  if (valueProps.found) {
3913
3913
  if (!isMap && !props.found && ctx.options.strict) {
3914
- if (sep)
3915
- for (const st of sep) {
3914
+ if (sep2)
3915
+ for (const st of sep2) {
3916
3916
  if (st === valueProps.found)
3917
3917
  break;
3918
3918
  if (st.type === "newline") {
@@ -3929,7 +3929,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3929
3929
  else
3930
3930
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3931
3931
  }
3932
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
3932
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
3933
3933
  if (valueNode) {
3934
3934
  if (isBlock(value))
3935
3935
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -4102,7 +4102,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
4102
4102
  chompStart = i + 1;
4103
4103
  }
4104
4104
  let value = "";
4105
- let sep = "";
4105
+ let sep2 = "";
4106
4106
  let prevMoreIndented = false;
4107
4107
  for (let i = 0;i < contentStart; ++i)
4108
4108
  value += lines[i][0].slice(trimIndent) + `
@@ -4120,33 +4120,33 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
4120
4120
  indent = "";
4121
4121
  }
4122
4122
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
4123
- value += sep + indent.slice(trimIndent) + content;
4124
- sep = `
4123
+ value += sep2 + indent.slice(trimIndent) + content;
4124
+ sep2 = `
4125
4125
  `;
4126
4126
  } else if (indent.length > trimIndent || content[0] === "\t") {
4127
- if (sep === " ")
4128
- sep = `
4127
+ if (sep2 === " ")
4128
+ sep2 = `
4129
4129
  `;
4130
- else if (!prevMoreIndented && sep === `
4130
+ else if (!prevMoreIndented && sep2 === `
4131
4131
  `)
4132
- sep = `
4132
+ sep2 = `
4133
4133
 
4134
4134
  `;
4135
- value += sep + indent.slice(trimIndent) + content;
4136
- sep = `
4135
+ value += sep2 + indent.slice(trimIndent) + content;
4136
+ sep2 = `
4137
4137
  `;
4138
4138
  prevMoreIndented = true;
4139
4139
  } else if (content === "") {
4140
- if (sep === `
4140
+ if (sep2 === `
4141
4141
  `)
4142
4142
  value += `
4143
4143
  `;
4144
4144
  else
4145
- sep = `
4145
+ sep2 = `
4146
4146
  `;
4147
4147
  } else {
4148
- value += sep + content;
4149
- sep = " ";
4148
+ value += sep2 + content;
4149
+ sep2 = " ";
4150
4150
  prevMoreIndented = false;
4151
4151
  }
4152
4152
  }
@@ -4325,27 +4325,27 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
4325
4325
  if (!match)
4326
4326
  return source;
4327
4327
  let res = match[1];
4328
- let sep = " ";
4328
+ let sep2 = " ";
4329
4329
  let pos = first.lastIndex;
4330
4330
  line.lastIndex = pos;
4331
4331
  while (match = line.exec(source)) {
4332
4332
  if (match[1] === "") {
4333
- if (sep === `
4333
+ if (sep2 === `
4334
4334
  `)
4335
- res += sep;
4335
+ res += sep2;
4336
4336
  else
4337
- sep = `
4337
+ sep2 = `
4338
4338
  `;
4339
4339
  } else {
4340
- res += sep + match[1];
4341
- sep = " ";
4340
+ res += sep2 + match[1];
4341
+ sep2 = " ";
4342
4342
  }
4343
4343
  pos = line.lastIndex;
4344
4344
  }
4345
4345
  const last = /[ \t]*(.*)/sy;
4346
4346
  last.lastIndex = pos;
4347
4347
  match = last.exec(source);
4348
- return res + sep + (match?.[1] ?? "");
4348
+ return res + sep2 + (match?.[1] ?? "");
4349
4349
  }
4350
4350
  function doubleQuotedValue(source, onError) {
4351
4351
  let res = "";
@@ -5112,14 +5112,14 @@ var require_cst_stringify = __commonJS2((exports) => {
5112
5112
  }
5113
5113
  }
5114
5114
  }
5115
- function stringifyItem({ start, key, sep, value }) {
5115
+ function stringifyItem({ start, key, sep: sep2, value }) {
5116
5116
  let res = "";
5117
5117
  for (const st of start)
5118
5118
  res += st.source;
5119
5119
  if (key)
5120
5120
  res += stringifyToken(key);
5121
- if (sep)
5122
- for (const st of sep)
5121
+ if (sep2)
5122
+ for (const st of sep2)
5123
5123
  res += st.source;
5124
5124
  if (value)
5125
5125
  res += stringifyToken(value);
@@ -6258,18 +6258,18 @@ var require_parser = __commonJS2((exports) => {
6258
6258
  if (this.type === "map-value-ind") {
6259
6259
  const prev = getPrevProps(this.peek(2));
6260
6260
  const start = getFirstKeyStartProps(prev);
6261
- let sep;
6261
+ let sep2;
6262
6262
  if (scalar.end) {
6263
- sep = scalar.end;
6264
- sep.push(this.sourceToken);
6263
+ sep2 = scalar.end;
6264
+ sep2.push(this.sourceToken);
6265
6265
  delete scalar.end;
6266
6266
  } else
6267
- sep = [this.sourceToken];
6267
+ sep2 = [this.sourceToken];
6268
6268
  const map = {
6269
6269
  type: "block-map",
6270
6270
  offset: scalar.offset,
6271
6271
  indent: scalar.indent,
6272
- items: [{ start, key: scalar, sep }]
6272
+ items: [{ start, key: scalar, sep: sep2 }]
6273
6273
  };
6274
6274
  this.onKeyLine = true;
6275
6275
  this.stack[this.stack.length - 1] = map;
@@ -6423,15 +6423,15 @@ var require_parser = __commonJS2((exports) => {
6423
6423
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6424
6424
  const start2 = getFirstKeyStartProps(it.start);
6425
6425
  const key = it.key;
6426
- const sep = it.sep;
6427
- sep.push(this.sourceToken);
6426
+ const sep2 = it.sep;
6427
+ sep2.push(this.sourceToken);
6428
6428
  delete it.key;
6429
6429
  delete it.sep;
6430
6430
  this.stack.push({
6431
6431
  type: "block-map",
6432
6432
  offset: this.offset,
6433
6433
  indent: this.indent,
6434
- items: [{ start: start2, key, sep }]
6434
+ items: [{ start: start2, key, sep: sep2 }]
6435
6435
  });
6436
6436
  } else if (start.length > 0) {
6437
6437
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -6625,13 +6625,13 @@ var require_parser = __commonJS2((exports) => {
6625
6625
  const prev = getPrevProps(parent);
6626
6626
  const start = getFirstKeyStartProps(prev);
6627
6627
  fixFlowSeqItems(fc);
6628
- const sep = fc.end.splice(1, fc.end.length);
6629
- sep.push(this.sourceToken);
6628
+ const sep2 = fc.end.splice(1, fc.end.length);
6629
+ sep2.push(this.sourceToken);
6630
6630
  const map = {
6631
6631
  type: "block-map",
6632
6632
  offset: fc.offset,
6633
6633
  indent: fc.indent,
6634
- items: [{ start, key: fc, sep }]
6634
+ items: [{ start, key: fc, sep: sep2 }]
6635
6635
  };
6636
6636
  this.onKeyLine = true;
6637
6637
  this.stack[this.stack.length - 1] = map;
@@ -11175,6 +11175,79 @@ var __dirname2 = dirname(__filename2);
11175
11175
  var import_yaml = __toESM2(require_dist(), 1);
11176
11176
  var LOCAL_BINDS = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
11177
11177
  var import_yaml2 = __toESM2(require_dist(), 1);
11178
+ function readEnv(env, name) {
11179
+ const value = env[name];
11180
+ if (typeof value !== "string")
11181
+ return;
11182
+ const trimmed = value.trim();
11183
+ return trimmed.length > 0 ? trimmed : undefined;
11184
+ }
11185
+ function normalizePort(raw, fallback) {
11186
+ if (!raw)
11187
+ return String(fallback);
11188
+ if (!/^\d+$/.test(raw)) {
11189
+ throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
11190
+ }
11191
+ const port = Number.parseInt(raw, 10);
11192
+ if (!Number.isFinite(port) || port < 1 || port > 65535) {
11193
+ throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
11194
+ }
11195
+ return String(port);
11196
+ }
11197
+ function bracketIpv6Host(host) {
11198
+ if (host.startsWith("[") || !host.includes(":"))
11199
+ return host;
11200
+ return `[${host}]`;
11201
+ }
11202
+ function assertPlainHost(raw) {
11203
+ if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
11204
+ throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
11205
+ }
11206
+ const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
11207
+ if (host.includes(":")) {
11208
+ if (/^[0-9A-Fa-f:.]+$/.test(host))
11209
+ return;
11210
+ throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
11211
+ }
11212
+ if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
11213
+ throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
11214
+ }
11215
+ }
11216
+ function normalizeDaemonUrl(raw, source) {
11217
+ let parsed;
11218
+ try {
11219
+ parsed = new URL(raw);
11220
+ } catch {
11221
+ throw new Error(`${source} must be an http(s) URL: ${raw}`);
11222
+ }
11223
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11224
+ throw new Error(`${source} must use http or https: ${raw}`);
11225
+ }
11226
+ if (parsed.username || parsed.password) {
11227
+ throw new Error(`${source} must not include username or password credentials`);
11228
+ }
11229
+ if (parsed.search || parsed.hash) {
11230
+ throw new Error(`${source} must not include query strings or fragments`);
11231
+ }
11232
+ if (parsed.pathname !== "/" && parsed.pathname !== "") {
11233
+ throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
11234
+ }
11235
+ return parsed.toString().replace(/\/$/, "");
11236
+ }
11237
+ function resolveSignetDaemonUrl(opts = {}) {
11238
+ const env = opts.env ?? process.env;
11239
+ const fallbackHost = opts.defaultHost ?? "127.0.0.1";
11240
+ const fallbackPort = opts.defaultPort ?? 3850;
11241
+ const explicit = readEnv(env, "SIGNET_DAEMON_URL");
11242
+ if (explicit)
11243
+ return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
11244
+ if (opts.configUrl)
11245
+ return normalizeDaemonUrl(opts.configUrl, "daemon.url");
11246
+ const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
11247
+ assertPlainHost(host);
11248
+ const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
11249
+ return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
11250
+ }
11178
11251
  var native = null;
11179
11252
  try {
11180
11253
  const esmRequire = createRequire2(import.meta.url);
@@ -11496,6 +11569,25 @@ function resolveSignetMcpCommand() {
11496
11569
  function resolveSignetCliCommand() {
11497
11570
  return resolvePackagedSignetCommand("signet", "bin", "signet.js", false);
11498
11571
  }
11572
+ function readTrimmedEnv2(name) {
11573
+ const value = process.env[name];
11574
+ if (typeof value !== "string")
11575
+ return;
11576
+ const trimmed = value.trim().replace(/[\r\n]+/g, "");
11577
+ return trimmed.length > 0 ? trimmed : undefined;
11578
+ }
11579
+ function readManagedTrimmedEnv(name) {
11580
+ return readTrimmedEnv2(name);
11581
+ }
11582
+ function resolveSignetDaemonUrl2() {
11583
+ return resolveSignetDaemonUrl();
11584
+ }
11585
+ function resolveSignetApiKey() {
11586
+ return readManagedTrimmedEnv("SIGNET_API_KEY") ?? readManagedTrimmedEnv("SIGNET_TOKEN");
11587
+ }
11588
+ function resolveRemoteDaemonUrl() {
11589
+ return readManagedTrimmedEnv("SIGNET_DAEMON_URL") ? resolveSignetDaemonUrl2() : null;
11590
+ }
11499
11591
 
11500
11592
  // ../../../platform/core/dist/index.js
11501
11593
  import { createRequire as createRequire3 } from "node:module";
@@ -15115,10 +15207,10 @@ var require_resolve_block_map2 = __commonJS((exports) => {
15115
15207
  let offset = bm.offset;
15116
15208
  let commentEnd = null;
15117
15209
  for (const collItem of bm.items) {
15118
- const { start, key, sep, value } = collItem;
15210
+ const { start, key, sep: sep2, value } = collItem;
15119
15211
  const keyProps = resolveProps.resolveProps(start, {
15120
15212
  indicator: "explicit-key-ind",
15121
- next: key ?? sep?.[0],
15213
+ next: key ?? sep2?.[0],
15122
15214
  offset,
15123
15215
  onError,
15124
15216
  parentIndent: bm.indent,
@@ -15132,7 +15224,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
15132
15224
  else if ("indent" in key && key.indent !== bm.indent)
15133
15225
  onError(offset, "BAD_INDENT", startColMsg);
15134
15226
  }
15135
- if (!keyProps.anchor && !keyProps.tag && !sep) {
15227
+ if (!keyProps.anchor && !keyProps.tag && !sep2) {
15136
15228
  commentEnd = keyProps.end;
15137
15229
  if (keyProps.comment) {
15138
15230
  if (map.comment)
@@ -15157,7 +15249,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
15157
15249
  ctx.atKey = false;
15158
15250
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
15159
15251
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
15160
- const valueProps = resolveProps.resolveProps(sep ?? [], {
15252
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
15161
15253
  indicator: "map-value-ind",
15162
15254
  next: value,
15163
15255
  offset: keyNode.range[2],
@@ -15173,7 +15265,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
15173
15265
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
15174
15266
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
15175
15267
  }
15176
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
15268
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
15177
15269
  if (ctx.schema.compat)
15178
15270
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
15179
15271
  offset = valueNode.range[2];
@@ -15255,7 +15347,7 @@ var require_resolve_end2 = __commonJS((exports) => {
15255
15347
  let comment = "";
15256
15348
  if (end) {
15257
15349
  let hasSpace = false;
15258
- let sep = "";
15350
+ let sep2 = "";
15259
15351
  for (const token of end) {
15260
15352
  const { source, type } = token;
15261
15353
  switch (type) {
@@ -15269,13 +15361,13 @@ var require_resolve_end2 = __commonJS((exports) => {
15269
15361
  if (!comment)
15270
15362
  comment = cb;
15271
15363
  else
15272
- comment += sep + cb;
15273
- sep = "";
15364
+ comment += sep2 + cb;
15365
+ sep2 = "";
15274
15366
  break;
15275
15367
  }
15276
15368
  case "newline":
15277
15369
  if (comment)
15278
- sep += source;
15370
+ sep2 += source;
15279
15371
  hasSpace = true;
15280
15372
  break;
15281
15373
  default:
@@ -15313,18 +15405,18 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
15313
15405
  let offset = fc.offset + fc.start.source.length;
15314
15406
  for (let i = 0;i < fc.items.length; ++i) {
15315
15407
  const collItem = fc.items[i];
15316
- const { start, key, sep, value } = collItem;
15408
+ const { start, key, sep: sep2, value } = collItem;
15317
15409
  const props = resolveProps.resolveProps(start, {
15318
15410
  flow: fcName,
15319
15411
  indicator: "explicit-key-ind",
15320
- next: key ?? sep?.[0],
15412
+ next: key ?? sep2?.[0],
15321
15413
  offset,
15322
15414
  onError,
15323
15415
  parentIndent: fc.indent,
15324
15416
  startOnNewline: false
15325
15417
  });
15326
15418
  if (!props.found) {
15327
- if (!props.anchor && !props.tag && !sep && !value) {
15419
+ if (!props.anchor && !props.tag && !sep2 && !value) {
15328
15420
  if (i === 0 && props.comma)
15329
15421
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
15330
15422
  else if (i < fc.items.length - 1)
@@ -15376,8 +15468,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
15376
15468
  }
15377
15469
  }
15378
15470
  }
15379
- if (!isMap && !sep && !props.found) {
15380
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);
15471
+ if (!isMap && !sep2 && !props.found) {
15472
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
15381
15473
  coll.items.push(valueNode);
15382
15474
  offset = valueNode.range[2];
15383
15475
  if (isBlock(value))
@@ -15389,7 +15481,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
15389
15481
  if (isBlock(key))
15390
15482
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
15391
15483
  ctx.atKey = false;
15392
- const valueProps = resolveProps.resolveProps(sep ?? [], {
15484
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
15393
15485
  flow: fcName,
15394
15486
  indicator: "map-value-ind",
15395
15487
  next: value,
@@ -15400,8 +15492,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
15400
15492
  });
15401
15493
  if (valueProps.found) {
15402
15494
  if (!isMap && !props.found && ctx.options.strict) {
15403
- if (sep)
15404
- for (const st of sep) {
15495
+ if (sep2)
15496
+ for (const st of sep2) {
15405
15497
  if (st === valueProps.found)
15406
15498
  break;
15407
15499
  if (st.type === "newline") {
@@ -15418,7 +15510,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
15418
15510
  else
15419
15511
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
15420
15512
  }
15421
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
15513
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
15422
15514
  if (valueNode) {
15423
15515
  if (isBlock(value))
15424
15516
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -15591,7 +15683,7 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
15591
15683
  chompStart = i + 1;
15592
15684
  }
15593
15685
  let value = "";
15594
- let sep = "";
15686
+ let sep2 = "";
15595
15687
  let prevMoreIndented = false;
15596
15688
  for (let i = 0;i < contentStart; ++i)
15597
15689
  value += lines[i][0].slice(trimIndent) + `
@@ -15609,33 +15701,33 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
15609
15701
  indent = "";
15610
15702
  }
15611
15703
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
15612
- value += sep + indent.slice(trimIndent) + content;
15613
- sep = `
15704
+ value += sep2 + indent.slice(trimIndent) + content;
15705
+ sep2 = `
15614
15706
  `;
15615
15707
  } else if (indent.length > trimIndent || content[0] === "\t") {
15616
- if (sep === " ")
15617
- sep = `
15708
+ if (sep2 === " ")
15709
+ sep2 = `
15618
15710
  `;
15619
- else if (!prevMoreIndented && sep === `
15711
+ else if (!prevMoreIndented && sep2 === `
15620
15712
  `)
15621
- sep = `
15713
+ sep2 = `
15622
15714
 
15623
15715
  `;
15624
- value += sep + indent.slice(trimIndent) + content;
15625
- sep = `
15716
+ value += sep2 + indent.slice(trimIndent) + content;
15717
+ sep2 = `
15626
15718
  `;
15627
15719
  prevMoreIndented = true;
15628
15720
  } else if (content === "") {
15629
- if (sep === `
15721
+ if (sep2 === `
15630
15722
  `)
15631
15723
  value += `
15632
15724
  `;
15633
15725
  else
15634
- sep = `
15726
+ sep2 = `
15635
15727
  `;
15636
15728
  } else {
15637
- value += sep + content;
15638
- sep = " ";
15729
+ value += sep2 + content;
15730
+ sep2 = " ";
15639
15731
  prevMoreIndented = false;
15640
15732
  }
15641
15733
  }
@@ -15814,27 +15906,27 @@ var require_resolve_flow_scalar2 = __commonJS((exports) => {
15814
15906
  if (!match)
15815
15907
  return source;
15816
15908
  let res = match[1];
15817
- let sep = " ";
15909
+ let sep2 = " ";
15818
15910
  let pos = first.lastIndex;
15819
15911
  line.lastIndex = pos;
15820
15912
  while (match = line.exec(source)) {
15821
15913
  if (match[1] === "") {
15822
- if (sep === `
15914
+ if (sep2 === `
15823
15915
  `)
15824
- res += sep;
15916
+ res += sep2;
15825
15917
  else
15826
- sep = `
15918
+ sep2 = `
15827
15919
  `;
15828
15920
  } else {
15829
- res += sep + match[1];
15830
- sep = " ";
15921
+ res += sep2 + match[1];
15922
+ sep2 = " ";
15831
15923
  }
15832
15924
  pos = line.lastIndex;
15833
15925
  }
15834
15926
  const last = /[ \t]*(.*)/sy;
15835
15927
  last.lastIndex = pos;
15836
15928
  match = last.exec(source);
15837
- return res + sep + (match?.[1] ?? "");
15929
+ return res + sep2 + (match?.[1] ?? "");
15838
15930
  }
15839
15931
  function doubleQuotedValue(source, onError) {
15840
15932
  let res = "";
@@ -16601,14 +16693,14 @@ var require_cst_stringify2 = __commonJS((exports) => {
16601
16693
  }
16602
16694
  }
16603
16695
  }
16604
- function stringifyItem({ start, key, sep, value }) {
16696
+ function stringifyItem({ start, key, sep: sep2, value }) {
16605
16697
  let res = "";
16606
16698
  for (const st of start)
16607
16699
  res += st.source;
16608
16700
  if (key)
16609
16701
  res += stringifyToken(key);
16610
- if (sep)
16611
- for (const st of sep)
16702
+ if (sep2)
16703
+ for (const st of sep2)
16612
16704
  res += st.source;
16613
16705
  if (value)
16614
16706
  res += stringifyToken(value);
@@ -17747,18 +17839,18 @@ var require_parser2 = __commonJS((exports) => {
17747
17839
  if (this.type === "map-value-ind") {
17748
17840
  const prev = getPrevProps(this.peek(2));
17749
17841
  const start = getFirstKeyStartProps(prev);
17750
- let sep;
17842
+ let sep2;
17751
17843
  if (scalar.end) {
17752
- sep = scalar.end;
17753
- sep.push(this.sourceToken);
17844
+ sep2 = scalar.end;
17845
+ sep2.push(this.sourceToken);
17754
17846
  delete scalar.end;
17755
17847
  } else
17756
- sep = [this.sourceToken];
17848
+ sep2 = [this.sourceToken];
17757
17849
  const map = {
17758
17850
  type: "block-map",
17759
17851
  offset: scalar.offset,
17760
17852
  indent: scalar.indent,
17761
- items: [{ start, key: scalar, sep }]
17853
+ items: [{ start, key: scalar, sep: sep2 }]
17762
17854
  };
17763
17855
  this.onKeyLine = true;
17764
17856
  this.stack[this.stack.length - 1] = map;
@@ -17912,15 +18004,15 @@ var require_parser2 = __commonJS((exports) => {
17912
18004
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
17913
18005
  const start2 = getFirstKeyStartProps(it.start);
17914
18006
  const key = it.key;
17915
- const sep = it.sep;
17916
- sep.push(this.sourceToken);
18007
+ const sep2 = it.sep;
18008
+ sep2.push(this.sourceToken);
17917
18009
  delete it.key;
17918
18010
  delete it.sep;
17919
18011
  this.stack.push({
17920
18012
  type: "block-map",
17921
18013
  offset: this.offset,
17922
18014
  indent: this.indent,
17923
- items: [{ start: start2, key, sep }]
18015
+ items: [{ start: start2, key, sep: sep2 }]
17924
18016
  });
17925
18017
  } else if (start.length > 0) {
17926
18018
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -18114,13 +18206,13 @@ var require_parser2 = __commonJS((exports) => {
18114
18206
  const prev = getPrevProps(parent);
18115
18207
  const start = getFirstKeyStartProps(prev);
18116
18208
  fixFlowSeqItems(fc);
18117
- const sep = fc.end.splice(1, fc.end.length);
18118
- sep.push(this.sourceToken);
18209
+ const sep2 = fc.end.splice(1, fc.end.length);
18210
+ sep2.push(this.sourceToken);
18119
18211
  const map = {
18120
18212
  type: "block-map",
18121
18213
  offset: fc.offset,
18122
18214
  indent: fc.indent,
18123
- items: [{ start, key: fc, sep }]
18215
+ items: [{ start, key: fc, sep: sep2 }]
18124
18216
  };
18125
18217
  this.onKeyLine = true;
18126
18218
  this.stack[this.stack.length - 1] = map;
@@ -22671,79 +22763,6 @@ function expandHome(p, home2 = homedir2()) {
22671
22763
  }
22672
22764
  var LOCAL_BINDS2 = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
22673
22765
  var import_yaml22 = __toESM(require_dist2(), 1);
22674
- function readEnv(env, name) {
22675
- const value = env[name];
22676
- if (typeof value !== "string")
22677
- return;
22678
- const trimmed = value.trim();
22679
- return trimmed.length > 0 ? trimmed : undefined;
22680
- }
22681
- function normalizePort(raw, fallback) {
22682
- if (!raw)
22683
- return String(fallback);
22684
- if (!/^\d+$/.test(raw)) {
22685
- throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
22686
- }
22687
- const port = Number.parseInt(raw, 10);
22688
- if (!Number.isFinite(port) || port < 1 || port > 65535) {
22689
- throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
22690
- }
22691
- return String(port);
22692
- }
22693
- function bracketIpv6Host(host) {
22694
- if (host.startsWith("[") || !host.includes(":"))
22695
- return host;
22696
- return `[${host}]`;
22697
- }
22698
- function assertPlainHost(raw) {
22699
- if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
22700
- throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
22701
- }
22702
- const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
22703
- if (host.includes(":")) {
22704
- if (/^[0-9A-Fa-f:.]+$/.test(host))
22705
- return;
22706
- throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
22707
- }
22708
- if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
22709
- throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
22710
- }
22711
- }
22712
- function normalizeDaemonUrl(raw, source) {
22713
- let parsed;
22714
- try {
22715
- parsed = new URL(raw);
22716
- } catch {
22717
- throw new Error(`${source} must be an http(s) URL: ${raw}`);
22718
- }
22719
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
22720
- throw new Error(`${source} must use http or https: ${raw}`);
22721
- }
22722
- if (parsed.username || parsed.password) {
22723
- throw new Error(`${source} must not include username or password credentials`);
22724
- }
22725
- if (parsed.search || parsed.hash) {
22726
- throw new Error(`${source} must not include query strings or fragments`);
22727
- }
22728
- if (parsed.pathname !== "/" && parsed.pathname !== "") {
22729
- throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
22730
- }
22731
- return parsed.toString().replace(/\/$/, "");
22732
- }
22733
- function resolveSignetDaemonUrl(opts = {}) {
22734
- const env = opts.env ?? process.env;
22735
- const fallbackHost = opts.defaultHost ?? "127.0.0.1";
22736
- const fallbackPort = opts.defaultPort ?? 3850;
22737
- const explicit = readEnv(env, "SIGNET_DAEMON_URL");
22738
- if (explicit)
22739
- return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
22740
- if (opts.configUrl)
22741
- return normalizeDaemonUrl(opts.configUrl, "daemon.url");
22742
- const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
22743
- assertPlainHost(host);
22744
- const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
22745
- return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
22746
- }
22747
22766
  var native2 = null;
22748
22767
  try {
22749
22768
  const esmRequire = createRequire22(import.meta.url);
@@ -22907,7 +22926,7 @@ var CODEX_PLUGIN_MARKETPLACE_NAME = "signet-local";
22907
22926
  var CODEX_PLUGIN_NAME = "signet";
22908
22927
  var CODEX_PLUGIN_CONFIG_NAME = `${CODEX_PLUGIN_NAME}@${CODEX_PLUGIN_MARKETPLACE_NAME}`;
22909
22928
  function resolveSignetEntry() {
22910
- const wrapperDir = readEnv2("SIGNET_WRAPPER_DIR") ?? readEnv2("SIGNET_DIR");
22929
+ const wrapperDir = readTrimmedEnv2("SIGNET_WRAPPER_DIR") ?? readTrimmedEnv2("SIGNET_DIR");
22911
22930
  const candidates = [
22912
22931
  wrapperDir ? join4(wrapperDir, "bin", "signet.js") : null,
22913
22932
  join4(dirname5(process.execPath), "..", "bin", "signet.js"),
@@ -22943,19 +22962,6 @@ function resolveSignetMcp(runtime = null) {
22943
22962
  return { command: runtime, args: [mcpEntry] };
22944
22963
  return resolveSignetMcpCommand();
22945
22964
  }
22946
- function readEnv2(name) {
22947
- const value = process.env[name];
22948
- if (typeof value !== "string")
22949
- return;
22950
- const trimmed = value.trim();
22951
- return trimmed.length > 0 ? trimmed : undefined;
22952
- }
22953
- function resolveRemoteDaemonUrl() {
22954
- const explicit = readEnv2("SIGNET_DAEMON_URL");
22955
- if (!explicit)
22956
- return null;
22957
- return resolveSignetDaemonUrl();
22958
- }
22959
22965
  var CODEX_DESKTOP_APP_PATHS = [join4(homedir(), "Applications", "Codex.app"), "/Applications/Codex.app"];
22960
22966
  var CODEX_RUNTIME_SCAN_DEPTH = 8;
22961
22967
  function codexDesktopNodeCandidates(root, depth = 0) {
@@ -23158,7 +23164,7 @@ function cmdEnvQuote(value) {
23158
23164
  return value.replace(/[\^"&|<>]/g, "^$&");
23159
23165
  }
23160
23166
  function readAuthTokenEnv() {
23161
- return readEnv2("SIGNET_API_KEY") ?? readEnv2("SIGNET_TOKEN");
23167
+ return resolveSignetApiKey();
23162
23168
  }
23163
23169
  function withRemoteDaemonEnv(command, remoteDaemonUrl) {
23164
23170
  const apiKey = readAuthTokenEnv();
@@ -23641,7 +23647,7 @@ class CodexConnector extends BaseConnector {
23641
23647
  return resolveCodexDesktopNode(this.getCodexDesktopAppPaths());
23642
23648
  }
23643
23649
  supportsNativePluginInstall() {
23644
- if (readEnv2("SIGNET_CODEX_DISABLE_NATIVE_PLUGIN") === "1")
23650
+ if (readTrimmedEnv2("SIGNET_CODEX_DISABLE_NATIVE_PLUGIN") === "1")
23645
23651
  return false;
23646
23652
  const result = spawnSync("codex", ["plugin", "--help"], {
23647
23653
  stdio: "ignore",
@@ -23650,7 +23656,7 @@ class CodexConnector extends BaseConnector {
23650
23656
  return result.status === 0;
23651
23657
  }
23652
23658
  nativePluginProvidesHooks() {
23653
- return readEnv2("SIGNET_CODEX_FORCE_COMPAT_HOOKS") !== "1";
23659
+ return readTrimmedEnv2("SIGNET_CODEX_FORCE_COMPAT_HOOKS") !== "1";
23654
23660
  }
23655
23661
  installNativePlugin(codexHome) {
23656
23662
  const result = spawnSync("codex", ["plugin", "add", CODEX_PLUGIN_CONFIG_NAME], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-codex",
3
- "version": "0.163.17",
3
+ "version": "0.163.19",
4
4
  "description": "Signet connector for Codex CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@signetai/connector-base": "0.163.17",
28
- "@signetai/core": "0.163.17"
27
+ "@signetai/connector-base": "0.163.19",
28
+ "@signetai/core": "0.163.19"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",