@signetai/connector-opencode 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":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EAKpB,MAAM,wBAAwB,CAAC;AAsFhC;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,SAAS,cAAc;IAEhC,SAAS,CAAC,eAAe,IAAI,MAAM;IAInC,aAAa,IAAI,MAAM;IAUvB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAI5B;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyGvD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAqC3C;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,OAAO;IAqBpC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAM3C;IAEF,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,mBAAmB;IAW3B;;OAEG;YACW,gBAAgB;CAmB9B;AAMD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC;AACzD,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EASpB,MAAM,wBAAwB,CAAC;AA+DhC;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,SAAS,cAAc;IAEhC,SAAS,CAAC,eAAe,IAAI,MAAM;IAInC,aAAa,IAAI,MAAM;IAUvB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAI5B;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyGvD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAqC3C;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,OAAO;IAqBpC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAM3C;IAEF,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,mBAAmB;IAW3B;;OAEG;YACW,gBAAgB;CAmB9B;AAMD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC;AACzD,eAAe,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  // src/index.ts
2
2
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
3
3
  import { homedir } from "node:os";
4
- import { join as join4, relative } from "node:path";
4
+ import { join as join4, relative as relative2 } from "node:path";
5
5
 
6
6
  // ../../../libs/connector-base/dist/index.js
7
7
  import { randomBytes } from "node:crypto";
8
8
  import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
9
- import { dirname as dirname3, join as join3 } from "node:path";
9
+ import { dirname as dirname3, isAbsolute, join as join3, relative, sep } from "node:path";
10
10
  import { createRequire } from "node:module";
11
11
  import { dirname, join } from "node:path";
12
12
  import { fileURLToPath } from "node:url";
@@ -3624,10 +3624,10 @@ var require_resolve_block_map = __commonJS2((exports) => {
3624
3624
  let offset = bm.offset;
3625
3625
  let commentEnd = null;
3626
3626
  for (const collItem of bm.items) {
3627
- const { start, key, sep, value } = collItem;
3627
+ const { start, key, sep: sep2, value } = collItem;
3628
3628
  const keyProps = resolveProps.resolveProps(start, {
3629
3629
  indicator: "explicit-key-ind",
3630
- next: key ?? sep?.[0],
3630
+ next: key ?? sep2?.[0],
3631
3631
  offset,
3632
3632
  onError,
3633
3633
  parentIndent: bm.indent,
@@ -3641,7 +3641,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3641
3641
  else if ("indent" in key && key.indent !== bm.indent)
3642
3642
  onError(offset, "BAD_INDENT", startColMsg);
3643
3643
  }
3644
- if (!keyProps.anchor && !keyProps.tag && !sep) {
3644
+ if (!keyProps.anchor && !keyProps.tag && !sep2) {
3645
3645
  commentEnd = keyProps.end;
3646
3646
  if (keyProps.comment) {
3647
3647
  if (map.comment)
@@ -3666,7 +3666,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3666
3666
  ctx.atKey = false;
3667
3667
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
3668
3668
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
3669
- const valueProps = resolveProps.resolveProps(sep ?? [], {
3669
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
3670
3670
  indicator: "map-value-ind",
3671
3671
  next: value,
3672
3672
  offset: keyNode.range[2],
@@ -3682,7 +3682,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
3682
3682
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
3683
3683
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
3684
3684
  }
3685
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
3685
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
3686
3686
  if (ctx.schema.compat)
3687
3687
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
3688
3688
  offset = valueNode.range[2];
@@ -3764,7 +3764,7 @@ var require_resolve_end = __commonJS2((exports) => {
3764
3764
  let comment = "";
3765
3765
  if (end) {
3766
3766
  let hasSpace = false;
3767
- let sep = "";
3767
+ let sep2 = "";
3768
3768
  for (const token of end) {
3769
3769
  const { source, type } = token;
3770
3770
  switch (type) {
@@ -3778,13 +3778,13 @@ var require_resolve_end = __commonJS2((exports) => {
3778
3778
  if (!comment)
3779
3779
  comment = cb;
3780
3780
  else
3781
- comment += sep + cb;
3782
- sep = "";
3781
+ comment += sep2 + cb;
3782
+ sep2 = "";
3783
3783
  break;
3784
3784
  }
3785
3785
  case "newline":
3786
3786
  if (comment)
3787
- sep += source;
3787
+ sep2 += source;
3788
3788
  hasSpace = true;
3789
3789
  break;
3790
3790
  default:
@@ -3822,18 +3822,18 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3822
3822
  let offset = fc.offset + fc.start.source.length;
3823
3823
  for (let i = 0;i < fc.items.length; ++i) {
3824
3824
  const collItem = fc.items[i];
3825
- const { start, key, sep, value } = collItem;
3825
+ const { start, key, sep: sep2, value } = collItem;
3826
3826
  const props = resolveProps.resolveProps(start, {
3827
3827
  flow: fcName,
3828
3828
  indicator: "explicit-key-ind",
3829
- next: key ?? sep?.[0],
3829
+ next: key ?? sep2?.[0],
3830
3830
  offset,
3831
3831
  onError,
3832
3832
  parentIndent: fc.indent,
3833
3833
  startOnNewline: false
3834
3834
  });
3835
3835
  if (!props.found) {
3836
- if (!props.anchor && !props.tag && !sep && !value) {
3836
+ if (!props.anchor && !props.tag && !sep2 && !value) {
3837
3837
  if (i === 0 && props.comma)
3838
3838
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
3839
3839
  else if (i < fc.items.length - 1)
@@ -3885,8 +3885,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3885
3885
  }
3886
3886
  }
3887
3887
  }
3888
- if (!isMap && !sep && !props.found) {
3889
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);
3888
+ if (!isMap && !sep2 && !props.found) {
3889
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
3890
3890
  coll.items.push(valueNode);
3891
3891
  offset = valueNode.range[2];
3892
3892
  if (isBlock(value))
@@ -3898,7 +3898,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3898
3898
  if (isBlock(key))
3899
3899
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
3900
3900
  ctx.atKey = false;
3901
- const valueProps = resolveProps.resolveProps(sep ?? [], {
3901
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
3902
3902
  flow: fcName,
3903
3903
  indicator: "map-value-ind",
3904
3904
  next: value,
@@ -3909,8 +3909,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3909
3909
  });
3910
3910
  if (valueProps.found) {
3911
3911
  if (!isMap && !props.found && ctx.options.strict) {
3912
- if (sep)
3913
- for (const st of sep) {
3912
+ if (sep2)
3913
+ for (const st of sep2) {
3914
3914
  if (st === valueProps.found)
3915
3915
  break;
3916
3916
  if (st.type === "newline") {
@@ -3927,7 +3927,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
3927
3927
  else
3928
3928
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3929
3929
  }
3930
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
3930
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
3931
3931
  if (valueNode) {
3932
3932
  if (isBlock(value))
3933
3933
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -4100,7 +4100,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
4100
4100
  chompStart = i + 1;
4101
4101
  }
4102
4102
  let value = "";
4103
- let sep = "";
4103
+ let sep2 = "";
4104
4104
  let prevMoreIndented = false;
4105
4105
  for (let i = 0;i < contentStart; ++i)
4106
4106
  value += lines[i][0].slice(trimIndent) + `
@@ -4118,33 +4118,33 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
4118
4118
  indent = "";
4119
4119
  }
4120
4120
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
4121
- value += sep + indent.slice(trimIndent) + content;
4122
- sep = `
4121
+ value += sep2 + indent.slice(trimIndent) + content;
4122
+ sep2 = `
4123
4123
  `;
4124
4124
  } else if (indent.length > trimIndent || content[0] === "\t") {
4125
- if (sep === " ")
4126
- sep = `
4125
+ if (sep2 === " ")
4126
+ sep2 = `
4127
4127
  `;
4128
- else if (!prevMoreIndented && sep === `
4128
+ else if (!prevMoreIndented && sep2 === `
4129
4129
  `)
4130
- sep = `
4130
+ sep2 = `
4131
4131
 
4132
4132
  `;
4133
- value += sep + indent.slice(trimIndent) + content;
4134
- sep = `
4133
+ value += sep2 + indent.slice(trimIndent) + content;
4134
+ sep2 = `
4135
4135
  `;
4136
4136
  prevMoreIndented = true;
4137
4137
  } else if (content === "") {
4138
- if (sep === `
4138
+ if (sep2 === `
4139
4139
  `)
4140
4140
  value += `
4141
4141
  `;
4142
4142
  else
4143
- sep = `
4143
+ sep2 = `
4144
4144
  `;
4145
4145
  } else {
4146
- value += sep + content;
4147
- sep = " ";
4146
+ value += sep2 + content;
4147
+ sep2 = " ";
4148
4148
  prevMoreIndented = false;
4149
4149
  }
4150
4150
  }
@@ -4323,27 +4323,27 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
4323
4323
  if (!match)
4324
4324
  return source;
4325
4325
  let res = match[1];
4326
- let sep = " ";
4326
+ let sep2 = " ";
4327
4327
  let pos = first.lastIndex;
4328
4328
  line.lastIndex = pos;
4329
4329
  while (match = line.exec(source)) {
4330
4330
  if (match[1] === "") {
4331
- if (sep === `
4331
+ if (sep2 === `
4332
4332
  `)
4333
- res += sep;
4333
+ res += sep2;
4334
4334
  else
4335
- sep = `
4335
+ sep2 = `
4336
4336
  `;
4337
4337
  } else {
4338
- res += sep + match[1];
4339
- sep = " ";
4338
+ res += sep2 + match[1];
4339
+ sep2 = " ";
4340
4340
  }
4341
4341
  pos = line.lastIndex;
4342
4342
  }
4343
4343
  const last = /[ \t]*(.*)/sy;
4344
4344
  last.lastIndex = pos;
4345
4345
  match = last.exec(source);
4346
- return res + sep + (match?.[1] ?? "");
4346
+ return res + sep2 + (match?.[1] ?? "");
4347
4347
  }
4348
4348
  function doubleQuotedValue(source, onError) {
4349
4349
  let res = "";
@@ -5110,14 +5110,14 @@ var require_cst_stringify = __commonJS2((exports) => {
5110
5110
  }
5111
5111
  }
5112
5112
  }
5113
- function stringifyItem({ start, key, sep, value }) {
5113
+ function stringifyItem({ start, key, sep: sep2, value }) {
5114
5114
  let res = "";
5115
5115
  for (const st of start)
5116
5116
  res += st.source;
5117
5117
  if (key)
5118
5118
  res += stringifyToken(key);
5119
- if (sep)
5120
- for (const st of sep)
5119
+ if (sep2)
5120
+ for (const st of sep2)
5121
5121
  res += st.source;
5122
5122
  if (value)
5123
5123
  res += stringifyToken(value);
@@ -6256,18 +6256,18 @@ var require_parser = __commonJS2((exports) => {
6256
6256
  if (this.type === "map-value-ind") {
6257
6257
  const prev = getPrevProps(this.peek(2));
6258
6258
  const start = getFirstKeyStartProps(prev);
6259
- let sep;
6259
+ let sep2;
6260
6260
  if (scalar.end) {
6261
- sep = scalar.end;
6262
- sep.push(this.sourceToken);
6261
+ sep2 = scalar.end;
6262
+ sep2.push(this.sourceToken);
6263
6263
  delete scalar.end;
6264
6264
  } else
6265
- sep = [this.sourceToken];
6265
+ sep2 = [this.sourceToken];
6266
6266
  const map = {
6267
6267
  type: "block-map",
6268
6268
  offset: scalar.offset,
6269
6269
  indent: scalar.indent,
6270
- items: [{ start, key: scalar, sep }]
6270
+ items: [{ start, key: scalar, sep: sep2 }]
6271
6271
  };
6272
6272
  this.onKeyLine = true;
6273
6273
  this.stack[this.stack.length - 1] = map;
@@ -6421,15 +6421,15 @@ var require_parser = __commonJS2((exports) => {
6421
6421
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6422
6422
  const start2 = getFirstKeyStartProps(it.start);
6423
6423
  const key = it.key;
6424
- const sep = it.sep;
6425
- sep.push(this.sourceToken);
6424
+ const sep2 = it.sep;
6425
+ sep2.push(this.sourceToken);
6426
6426
  delete it.key;
6427
6427
  delete it.sep;
6428
6428
  this.stack.push({
6429
6429
  type: "block-map",
6430
6430
  offset: this.offset,
6431
6431
  indent: this.indent,
6432
- items: [{ start: start2, key, sep }]
6432
+ items: [{ start: start2, key, sep: sep2 }]
6433
6433
  });
6434
6434
  } else if (start.length > 0) {
6435
6435
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -6623,13 +6623,13 @@ var require_parser = __commonJS2((exports) => {
6623
6623
  const prev = getPrevProps(parent);
6624
6624
  const start = getFirstKeyStartProps(prev);
6625
6625
  fixFlowSeqItems(fc);
6626
- const sep = fc.end.splice(1, fc.end.length);
6627
- sep.push(this.sourceToken);
6626
+ const sep2 = fc.end.splice(1, fc.end.length);
6627
+ sep2.push(this.sourceToken);
6628
6628
  const map = {
6629
6629
  type: "block-map",
6630
6630
  offset: fc.offset,
6631
6631
  indent: fc.indent,
6632
- items: [{ start, key: fc, sep }]
6632
+ items: [{ start, key: fc, sep: sep2 }]
6633
6633
  };
6634
6634
  this.onKeyLine = true;
6635
6635
  this.stack[this.stack.length - 1] = map;
@@ -11173,6 +11173,79 @@ var __dirname2 = dirname(__filename2);
11173
11173
  var import_yaml = __toESM2(require_dist(), 1);
11174
11174
  var LOCAL_BINDS = new Set(["127.0.0.1", "localhost", "::1", "::ffff:127.0.0.1"]);
11175
11175
  var import_yaml2 = __toESM2(require_dist(), 1);
11176
+ function readEnv(env, name) {
11177
+ const value = env[name];
11178
+ if (typeof value !== "string")
11179
+ return;
11180
+ const trimmed = value.trim();
11181
+ return trimmed.length > 0 ? trimmed : undefined;
11182
+ }
11183
+ function normalizePort(raw, fallback) {
11184
+ if (!raw)
11185
+ return String(fallback);
11186
+ if (!/^\d+$/.test(raw)) {
11187
+ throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
11188
+ }
11189
+ const port = Number.parseInt(raw, 10);
11190
+ if (!Number.isFinite(port) || port < 1 || port > 65535) {
11191
+ throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
11192
+ }
11193
+ return String(port);
11194
+ }
11195
+ function bracketIpv6Host(host) {
11196
+ if (host.startsWith("[") || !host.includes(":"))
11197
+ return host;
11198
+ return `[${host}]`;
11199
+ }
11200
+ function assertPlainHost(raw) {
11201
+ if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
11202
+ throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
11203
+ }
11204
+ const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
11205
+ if (host.includes(":")) {
11206
+ if (/^[0-9A-Fa-f:.]+$/.test(host))
11207
+ return;
11208
+ throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
11209
+ }
11210
+ if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
11211
+ throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
11212
+ }
11213
+ }
11214
+ function normalizeDaemonUrl(raw, source) {
11215
+ let parsed;
11216
+ try {
11217
+ parsed = new URL(raw);
11218
+ } catch {
11219
+ throw new Error(`${source} must be an http(s) URL: ${raw}`);
11220
+ }
11221
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11222
+ throw new Error(`${source} must use http or https: ${raw}`);
11223
+ }
11224
+ if (parsed.username || parsed.password) {
11225
+ throw new Error(`${source} must not include username or password credentials`);
11226
+ }
11227
+ if (parsed.search || parsed.hash) {
11228
+ throw new Error(`${source} must not include query strings or fragments`);
11229
+ }
11230
+ if (parsed.pathname !== "/" && parsed.pathname !== "") {
11231
+ throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
11232
+ }
11233
+ return parsed.toString().replace(/\/$/, "");
11234
+ }
11235
+ function resolveSignetDaemonUrl(opts = {}) {
11236
+ const env = opts.env ?? process.env;
11237
+ const fallbackHost = opts.defaultHost ?? "127.0.0.1";
11238
+ const fallbackPort = opts.defaultPort ?? 3850;
11239
+ const explicit = readEnv(env, "SIGNET_DAEMON_URL");
11240
+ if (explicit)
11241
+ return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
11242
+ if (opts.configUrl)
11243
+ return normalizeDaemonUrl(opts.configUrl, "daemon.url");
11244
+ const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
11245
+ assertPlainHost(host);
11246
+ const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
11247
+ return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
11248
+ }
11176
11249
  var native = null;
11177
11250
  try {
11178
11251
  const esmRequire = createRequire2(import.meta.url);
@@ -11496,6 +11569,43 @@ function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName,
11496
11569
  function resolveSignetMcpCommand() {
11497
11570
  return resolvePackagedSignetCommand("signet-mcp", "dist", "mcp-stdio.js", true);
11498
11571
  }
11572
+ function isJsonObject(value) {
11573
+ return typeof value === "object" && value !== null && !Array.isArray(value);
11574
+ }
11575
+ function readTrimmedEnv2(name) {
11576
+ const value = process.env[name];
11577
+ if (typeof value !== "string")
11578
+ return;
11579
+ const trimmed = value.trim().replace(/[\r\n]+/g, "");
11580
+ return trimmed.length > 0 ? trimmed : undefined;
11581
+ }
11582
+ function readManagedTrimmedEnv(name) {
11583
+ return readTrimmedEnv2(name);
11584
+ }
11585
+ function resolveSignetDaemonUrl2() {
11586
+ return resolveSignetDaemonUrl();
11587
+ }
11588
+ function resolveSignetApiKey() {
11589
+ return readManagedTrimmedEnv("SIGNET_API_KEY") ?? readManagedTrimmedEnv("SIGNET_TOKEN");
11590
+ }
11591
+ function buildSignetRuntimeEnv(opts = {}) {
11592
+ const env = {};
11593
+ if (opts.basePath)
11594
+ env.SIGNET_PATH = opts.basePath;
11595
+ const daemonUrl = readManagedTrimmedEnv("SIGNET_DAEMON_URL");
11596
+ const apiKey = resolveSignetApiKey();
11597
+ const agentId = readManagedTrimmedEnv("SIGNET_AGENT_ID");
11598
+ if (daemonUrl)
11599
+ env.SIGNET_DAEMON_URL = resolveSignetDaemonUrl2();
11600
+ if (apiKey)
11601
+ env.SIGNET_API_KEY = apiKey;
11602
+ if (agentId)
11603
+ env.SIGNET_AGENT_ID = agentId;
11604
+ return env;
11605
+ }
11606
+ function resolveRemoteDaemonUrl() {
11607
+ return readManagedTrimmedEnv("SIGNET_DAEMON_URL") ? resolveSignetDaemonUrl2() : null;
11608
+ }
11499
11609
 
11500
11610
  // ../../../libs/connector-base/dist/lenient-json.js
11501
11611
  var __create = Object.create;
@@ -17108,10 +17218,10 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
17108
17218
  let offset = bm.offset;
17109
17219
  let commentEnd = null;
17110
17220
  for (const collItem of bm.items) {
17111
- const { start, key, sep, value } = collItem;
17221
+ const { start, key, sep: sep2, value } = collItem;
17112
17222
  const keyProps = resolveProps.resolveProps(start, {
17113
17223
  indicator: "explicit-key-ind",
17114
- next: key ?? sep?.[0],
17224
+ next: key ?? sep2?.[0],
17115
17225
  offset,
17116
17226
  onError,
17117
17227
  parentIndent: bm.indent,
@@ -17125,7 +17235,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
17125
17235
  else if ("indent" in key && key.indent !== bm.indent)
17126
17236
  onError(offset, "BAD_INDENT", startColMsg);
17127
17237
  }
17128
- if (!keyProps.anchor && !keyProps.tag && !sep) {
17238
+ if (!keyProps.anchor && !keyProps.tag && !sep2) {
17129
17239
  commentEnd = keyProps.end;
17130
17240
  if (keyProps.comment) {
17131
17241
  if (map.comment)
@@ -17150,7 +17260,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
17150
17260
  ctx.atKey = false;
17151
17261
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
17152
17262
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
17153
- const valueProps = resolveProps.resolveProps(sep ?? [], {
17263
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
17154
17264
  indicator: "map-value-ind",
17155
17265
  next: value,
17156
17266
  offset: keyNode.range[2],
@@ -17166,7 +17276,7 @@ var require_resolve_block_map2 = __commonJS3((exports) => {
17166
17276
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
17167
17277
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
17168
17278
  }
17169
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
17279
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
17170
17280
  if (ctx.schema.compat)
17171
17281
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
17172
17282
  offset = valueNode.range[2];
@@ -17248,7 +17358,7 @@ var require_resolve_end2 = __commonJS3((exports) => {
17248
17358
  let comment = "";
17249
17359
  if (end) {
17250
17360
  let hasSpace = false;
17251
- let sep = "";
17361
+ let sep2 = "";
17252
17362
  for (const token of end) {
17253
17363
  const { source, type } = token;
17254
17364
  switch (type) {
@@ -17262,13 +17372,13 @@ var require_resolve_end2 = __commonJS3((exports) => {
17262
17372
  if (!comment)
17263
17373
  comment = cb;
17264
17374
  else
17265
- comment += sep + cb;
17266
- sep = "";
17375
+ comment += sep2 + cb;
17376
+ sep2 = "";
17267
17377
  break;
17268
17378
  }
17269
17379
  case "newline":
17270
17380
  if (comment)
17271
- sep += source;
17381
+ sep2 += source;
17272
17382
  hasSpace = true;
17273
17383
  break;
17274
17384
  default:
@@ -17306,18 +17416,18 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
17306
17416
  let offset = fc.offset + fc.start.source.length;
17307
17417
  for (let i = 0;i < fc.items.length; ++i) {
17308
17418
  const collItem = fc.items[i];
17309
- const { start, key, sep, value } = collItem;
17419
+ const { start, key, sep: sep2, value } = collItem;
17310
17420
  const props = resolveProps.resolveProps(start, {
17311
17421
  flow: fcName,
17312
17422
  indicator: "explicit-key-ind",
17313
- next: key ?? sep?.[0],
17423
+ next: key ?? sep2?.[0],
17314
17424
  offset,
17315
17425
  onError,
17316
17426
  parentIndent: fc.indent,
17317
17427
  startOnNewline: false
17318
17428
  });
17319
17429
  if (!props.found) {
17320
- if (!props.anchor && !props.tag && !sep && !value) {
17430
+ if (!props.anchor && !props.tag && !sep2 && !value) {
17321
17431
  if (i === 0 && props.comma)
17322
17432
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
17323
17433
  else if (i < fc.items.length - 1)
@@ -17369,8 +17479,8 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
17369
17479
  }
17370
17480
  }
17371
17481
  }
17372
- if (!isMap && !sep && !props.found) {
17373
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);
17482
+ if (!isMap && !sep2 && !props.found) {
17483
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
17374
17484
  coll.items.push(valueNode);
17375
17485
  offset = valueNode.range[2];
17376
17486
  if (isBlock(value))
@@ -17382,7 +17492,7 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
17382
17492
  if (isBlock(key))
17383
17493
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
17384
17494
  ctx.atKey = false;
17385
- const valueProps = resolveProps.resolveProps(sep ?? [], {
17495
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
17386
17496
  flow: fcName,
17387
17497
  indicator: "map-value-ind",
17388
17498
  next: value,
@@ -17393,8 +17503,8 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
17393
17503
  });
17394
17504
  if (valueProps.found) {
17395
17505
  if (!isMap && !props.found && ctx.options.strict) {
17396
- if (sep)
17397
- for (const st of sep) {
17506
+ if (sep2)
17507
+ for (const st of sep2) {
17398
17508
  if (st === valueProps.found)
17399
17509
  break;
17400
17510
  if (st.type === "newline") {
@@ -17411,7 +17521,7 @@ var require_resolve_flow_collection2 = __commonJS3((exports) => {
17411
17521
  else
17412
17522
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
17413
17523
  }
17414
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
17524
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
17415
17525
  if (valueNode) {
17416
17526
  if (isBlock(value))
17417
17527
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -17584,7 +17694,7 @@ var require_resolve_block_scalar2 = __commonJS3((exports) => {
17584
17694
  chompStart = i + 1;
17585
17695
  }
17586
17696
  let value = "";
17587
- let sep = "";
17697
+ let sep2 = "";
17588
17698
  let prevMoreIndented = false;
17589
17699
  for (let i = 0;i < contentStart; ++i)
17590
17700
  value += lines[i][0].slice(trimIndent) + `
@@ -17602,33 +17712,33 @@ var require_resolve_block_scalar2 = __commonJS3((exports) => {
17602
17712
  indent = "";
17603
17713
  }
17604
17714
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
17605
- value += sep + indent.slice(trimIndent) + content;
17606
- sep = `
17715
+ value += sep2 + indent.slice(trimIndent) + content;
17716
+ sep2 = `
17607
17717
  `;
17608
17718
  } else if (indent.length > trimIndent || content[0] === "\t") {
17609
- if (sep === " ")
17610
- sep = `
17719
+ if (sep2 === " ")
17720
+ sep2 = `
17611
17721
  `;
17612
- else if (!prevMoreIndented && sep === `
17722
+ else if (!prevMoreIndented && sep2 === `
17613
17723
  `)
17614
- sep = `
17724
+ sep2 = `
17615
17725
 
17616
17726
  `;
17617
- value += sep + indent.slice(trimIndent) + content;
17618
- sep = `
17727
+ value += sep2 + indent.slice(trimIndent) + content;
17728
+ sep2 = `
17619
17729
  `;
17620
17730
  prevMoreIndented = true;
17621
17731
  } else if (content === "") {
17622
- if (sep === `
17732
+ if (sep2 === `
17623
17733
  `)
17624
17734
  value += `
17625
17735
  `;
17626
17736
  else
17627
- sep = `
17737
+ sep2 = `
17628
17738
  `;
17629
17739
  } else {
17630
- value += sep + content;
17631
- sep = " ";
17740
+ value += sep2 + content;
17741
+ sep2 = " ";
17632
17742
  prevMoreIndented = false;
17633
17743
  }
17634
17744
  }
@@ -17807,27 +17917,27 @@ var require_resolve_flow_scalar2 = __commonJS3((exports) => {
17807
17917
  if (!match)
17808
17918
  return source;
17809
17919
  let res = match[1];
17810
- let sep = " ";
17920
+ let sep2 = " ";
17811
17921
  let pos = first.lastIndex;
17812
17922
  line.lastIndex = pos;
17813
17923
  while (match = line.exec(source)) {
17814
17924
  if (match[1] === "") {
17815
- if (sep === `
17925
+ if (sep2 === `
17816
17926
  `)
17817
- res += sep;
17927
+ res += sep2;
17818
17928
  else
17819
- sep = `
17929
+ sep2 = `
17820
17930
  `;
17821
17931
  } else {
17822
- res += sep + match[1];
17823
- sep = " ";
17932
+ res += sep2 + match[1];
17933
+ sep2 = " ";
17824
17934
  }
17825
17935
  pos = line.lastIndex;
17826
17936
  }
17827
17937
  const last = /[ \t]*(.*)/sy;
17828
17938
  last.lastIndex = pos;
17829
17939
  match = last.exec(source);
17830
- return res + sep + (match?.[1] ?? "");
17940
+ return res + sep2 + (match?.[1] ?? "");
17831
17941
  }
17832
17942
  function doubleQuotedValue(source, onError) {
17833
17943
  let res = "";
@@ -18594,14 +18704,14 @@ var require_cst_stringify2 = __commonJS3((exports) => {
18594
18704
  }
18595
18705
  }
18596
18706
  }
18597
- function stringifyItem({ start, key, sep, value }) {
18707
+ function stringifyItem({ start, key, sep: sep2, value }) {
18598
18708
  let res = "";
18599
18709
  for (const st of start)
18600
18710
  res += st.source;
18601
18711
  if (key)
18602
18712
  res += stringifyToken(key);
18603
- if (sep)
18604
- for (const st of sep)
18713
+ if (sep2)
18714
+ for (const st of sep2)
18605
18715
  res += st.source;
18606
18716
  if (value)
18607
18717
  res += stringifyToken(value);
@@ -19740,18 +19850,18 @@ var require_parser2 = __commonJS3((exports) => {
19740
19850
  if (this.type === "map-value-ind") {
19741
19851
  const prev = getPrevProps(this.peek(2));
19742
19852
  const start = getFirstKeyStartProps(prev);
19743
- let sep;
19853
+ let sep2;
19744
19854
  if (scalar.end) {
19745
- sep = scalar.end;
19746
- sep.push(this.sourceToken);
19855
+ sep2 = scalar.end;
19856
+ sep2.push(this.sourceToken);
19747
19857
  delete scalar.end;
19748
19858
  } else
19749
- sep = [this.sourceToken];
19859
+ sep2 = [this.sourceToken];
19750
19860
  const map = {
19751
19861
  type: "block-map",
19752
19862
  offset: scalar.offset,
19753
19863
  indent: scalar.indent,
19754
- items: [{ start, key: scalar, sep }]
19864
+ items: [{ start, key: scalar, sep: sep2 }]
19755
19865
  };
19756
19866
  this.onKeyLine = true;
19757
19867
  this.stack[this.stack.length - 1] = map;
@@ -19905,15 +20015,15 @@ var require_parser2 = __commonJS3((exports) => {
19905
20015
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
19906
20016
  const start2 = getFirstKeyStartProps(it.start);
19907
20017
  const key = it.key;
19908
- const sep = it.sep;
19909
- sep.push(this.sourceToken);
20018
+ const sep2 = it.sep;
20019
+ sep2.push(this.sourceToken);
19910
20020
  delete it.key;
19911
20021
  delete it.sep;
19912
20022
  this.stack.push({
19913
20023
  type: "block-map",
19914
20024
  offset: this.offset,
19915
20025
  indent: this.indent,
19916
- items: [{ start: start2, key, sep }]
20026
+ items: [{ start: start2, key, sep: sep2 }]
19917
20027
  });
19918
20028
  } else if (start.length > 0) {
19919
20029
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -20107,13 +20217,13 @@ var require_parser2 = __commonJS3((exports) => {
20107
20217
  const prev = getPrevProps(parent);
20108
20218
  const start = getFirstKeyStartProps(prev);
20109
20219
  fixFlowSeqItems(fc);
20110
- const sep = fc.end.splice(1, fc.end.length);
20111
- sep.push(this.sourceToken);
20220
+ const sep2 = fc.end.splice(1, fc.end.length);
20221
+ sep2.push(this.sourceToken);
20112
20222
  const map = {
20113
20223
  type: "block-map",
20114
20224
  offset: fc.offset,
20115
20225
  indent: fc.indent,
20116
- items: [{ start, key: fc, sep }]
20226
+ items: [{ start, key: fc, sep: sep2 }]
20117
20227
  };
20118
20228
  this.onKeyLine = true;
20119
20229
  this.stack[this.stack.length - 1] = map;
@@ -24674,79 +24784,6 @@ function parseSimpleYaml(text) {
24674
24784
  return {};
24675
24785
  }
24676
24786
  }
24677
- function readEnv(env, name) {
24678
- const value = env[name];
24679
- if (typeof value !== "string")
24680
- return;
24681
- const trimmed = value.trim();
24682
- return trimmed.length > 0 ? trimmed : undefined;
24683
- }
24684
- function normalizePort(raw, fallback) {
24685
- if (!raw)
24686
- return String(fallback);
24687
- if (!/^\d+$/.test(raw)) {
24688
- throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
24689
- }
24690
- const port = Number.parseInt(raw, 10);
24691
- if (!Number.isFinite(port) || port < 1 || port > 65535) {
24692
- throw new Error(`SIGNET_PORT must be an integer between 1 and 65535: ${raw}`);
24693
- }
24694
- return String(port);
24695
- }
24696
- function bracketIpv6Host(host) {
24697
- if (host.startsWith("[") || !host.includes(":"))
24698
- return host;
24699
- return `[${host}]`;
24700
- }
24701
- function assertPlainHost(raw) {
24702
- if (raw.includes("/") || raw.includes("@") || raw.includes("?") || raw.includes("#")) {
24703
- throw new Error(`SIGNET_HOST must be a hostname or IP address, not a URL: ${raw}`);
24704
- }
24705
- const host = raw.startsWith("[") && raw.endsWith("]") ? raw.slice(1, -1) : raw;
24706
- if (host.includes(":")) {
24707
- if (/^[0-9A-Fa-f:.]+$/.test(host))
24708
- return;
24709
- throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
24710
- }
24711
- if (!/^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(host)) {
24712
- throw new Error(`SIGNET_HOST must be a hostname or IP address: ${raw}`);
24713
- }
24714
- }
24715
- function normalizeDaemonUrl(raw, source) {
24716
- let parsed;
24717
- try {
24718
- parsed = new URL(raw);
24719
- } catch {
24720
- throw new Error(`${source} must be an http(s) URL: ${raw}`);
24721
- }
24722
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
24723
- throw new Error(`${source} must use http or https: ${raw}`);
24724
- }
24725
- if (parsed.username || parsed.password) {
24726
- throw new Error(`${source} must not include username or password credentials`);
24727
- }
24728
- if (parsed.search || parsed.hash) {
24729
- throw new Error(`${source} must not include query strings or fragments`);
24730
- }
24731
- if (parsed.pathname !== "/" && parsed.pathname !== "") {
24732
- throw new Error(`${source} must point at the daemon origin, not a path: ${raw}`);
24733
- }
24734
- return parsed.toString().replace(/\/$/, "");
24735
- }
24736
- function resolveSignetDaemonUrl(opts = {}) {
24737
- const env = opts.env ?? process.env;
24738
- const fallbackHost = opts.defaultHost ?? "127.0.0.1";
24739
- const fallbackPort = opts.defaultPort ?? 3850;
24740
- const explicit = readEnv(env, "SIGNET_DAEMON_URL");
24741
- if (explicit)
24742
- return normalizeDaemonUrl(explicit, "SIGNET_DAEMON_URL");
24743
- if (opts.configUrl)
24744
- return normalizeDaemonUrl(opts.configUrl, "daemon.url");
24745
- const host = readEnv(env, "SIGNET_HOST") ?? fallbackHost;
24746
- assertPlainHost(host);
24747
- const port = normalizePort(readEnv(env, "SIGNET_PORT"), fallbackPort);
24748
- return normalizeDaemonUrl(`http://${bracketIpv6Host(host)}:${port}`, "SIGNET_HOST/SIGNET_PORT");
24749
- }
24750
24787
  var native2 = null;
24751
24788
  try {
24752
24789
  const esmRequire = createRequire22(import.meta.url);
@@ -25667,11 +25704,11 @@ function parseTree(text, errors = [], options = ParseOptions2.DEFAULT) {
25667
25704
  onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
25668
25705
  ensurePropertyComplete(offset + length);
25669
25706
  },
25670
- onSeparator: (sep, offset, length) => {
25707
+ onSeparator: (sep2, offset, length) => {
25671
25708
  if (currentParent.type === "property") {
25672
- if (sep === ":") {
25709
+ if (sep2 === ":") {
25673
25710
  currentParent.colonOffset = offset;
25674
- } else if (sep === ",") {
25711
+ } else if (sep2 === ",") {
25675
25712
  ensurePropertyComplete(offset);
25676
25713
  }
25677
25714
  }
@@ -28718,28 +28755,8 @@ Set the \\\`cycles\\\` parameter to \\\`"ref"\\\` to resolve cyclical schemas wi
28718
28755
 
28719
28756
  // src/index.ts
28720
28757
  var API_KEY_FILE_NAME = ".signet-api-key";
28721
- function isJsonObject(value) {
28722
- return typeof value === "object" && value !== null && !Array.isArray(value);
28723
- }
28724
- function readTrimmedEnv(name) {
28725
- const value = process.env[name];
28726
- return typeof value === "string" && value.trim().length > 0 ? value.trim().replace(/[\r\n]+/g, "") : undefined;
28727
- }
28728
- function signetRuntimeEnv() {
28729
- const env = {};
28730
- const daemonUrl = configuredDaemonUrl();
28731
- const apiKey = readTrimmedEnv("SIGNET_API_KEY") ?? readTrimmedEnv("SIGNET_TOKEN");
28732
- const agentId = readTrimmedEnv("SIGNET_AGENT_ID");
28733
- if (daemonUrl)
28734
- env.SIGNET_DAEMON_URL = daemonUrl;
28735
- if (apiKey)
28736
- env.SIGNET_API_KEY = apiKey;
28737
- if (agentId)
28738
- env.SIGNET_AGENT_ID = agentId;
28739
- return env;
28740
- }
28741
28758
  function buildPluginBundle(apiKeyFilePath) {
28742
- const env = signetRuntimeEnv();
28759
+ const env = buildSignetRuntimeEnv();
28743
28760
  if (apiKeyFilePath)
28744
28761
  Reflect.deleteProperty(env, "SIGNET_API_KEY");
28745
28762
  const assignments = Object.entries(env).map(([key, value]) => `process.env[${JSON.stringify(key)}] = ${JSON.stringify(value)};`);
@@ -28775,10 +28792,7 @@ function writeConfigValue(configPath, path, value) {
28775
28792
  atomicWriteText(configPath, hasBom ? `\uFEFF${updated}` : updated);
28776
28793
  }
28777
28794
  function configuredDaemonUrl() {
28778
- const daemonUrl = readTrimmedEnv("SIGNET_DAEMON_URL");
28779
- if (!daemonUrl)
28780
- return;
28781
- return resolveSignetDaemonUrl({ env: { SIGNET_DAEMON_URL: daemonUrl } });
28795
+ return resolveRemoteDaemonUrl() ?? undefined;
28782
28796
  }
28783
28797
 
28784
28798
  class OpenCodeConnector extends BaseConnector {
@@ -28806,7 +28820,7 @@ class OpenCodeConnector extends BaseConnector {
28806
28820
  return join4(this.getPluginsPath(opencodePath), API_KEY_FILE_NAME);
28807
28821
  }
28808
28822
  getPluginConfigEntry(opencodePath) {
28809
- return `./${relative(opencodePath, this.getPluginFilePath(opencodePath)).replaceAll("\\", "/")}`;
28823
+ return `./${relative2(opencodePath, this.getPluginFilePath(opencodePath)).replaceAll("\\", "/")}`;
28810
28824
  }
28811
28825
  async install(basePath) {
28812
28826
  const filesWritten = [];
@@ -28837,7 +28851,7 @@ class OpenCodeConnector extends BaseConnector {
28837
28851
  mkdirSync(pluginsPath, { recursive: true });
28838
28852
  }
28839
28853
  this.migrateFromLegacy(opencodePath);
28840
- const apiKey = readTrimmedEnv("SIGNET_API_KEY") ?? readTrimmedEnv("SIGNET_TOKEN");
28854
+ const apiKey = readTrimmedEnv2("SIGNET_API_KEY") ?? readTrimmedEnv2("SIGNET_TOKEN");
28841
28855
  const apiKeyFilePath = this.getApiKeyFilePath(opencodePath);
28842
28856
  if (apiKey) {
28843
28857
  atomicWriteText(apiKeyFilePath, `${apiKey}
@@ -29023,7 +29037,7 @@ class OpenCodeConnector extends BaseConnector {
29023
29037
  }
29024
29038
  const resolvedMcp = resolveSignetMcpCommand();
29025
29039
  const mcpCommand = [resolvedMcp.command, ...resolvedMcp.args];
29026
- const environment = signetRuntimeEnv();
29040
+ const environment = buildSignetRuntimeEnv();
29027
29041
  if (apiKeyFile)
29028
29042
  environment.SIGNET_API_KEY = `{file:${apiKeyFile}}`;
29029
29043
  writeConfigValue(configPath, ["mcp", "signet"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-opencode",
3
- "version": "0.163.17",
3
+ "version": "0.163.19",
4
4
  "description": "Signet connector for OpenCode - installs hooks and generates config",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.163.17",
29
- "@signetai/core": "0.163.17",
28
+ "@signetai/connector-base": "0.163.19",
29
+ "@signetai/core": "0.163.19",
30
30
  "jsonc-parser": "3.3.1"
31
31
  },
32
32
  "devDependencies": {