@signetai/connector-opencode 0.231.1 → 0.231.2
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 +17 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { join as join4, relative as relative2 } from "node:path";
|
|
|
6
6
|
// ../../../libs/connector-base/dist/index.js
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
import { existsSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
|
-
import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
|
|
9
|
+
import { basename as basename2, dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { dirname, join, resolve } from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
@@ -17845,6 +17845,17 @@ function atomicWriteJson(path, data, indent = 2) {
|
|
|
17845
17845
|
atomicWriteText(path, `${JSON.stringify(data, null, indent)}
|
|
17846
17846
|
`);
|
|
17847
17847
|
}
|
|
17848
|
+
var SIGNET_MCP_STDIO_WORKER_ENV = "SIGNET_MCP_STDIO_WORKER";
|
|
17849
|
+
function resolveRunningNativeSignetBinary() {
|
|
17850
|
+
const executable = process.execPath;
|
|
17851
|
+
if (!/^signet(?:\.exe)?$/i.test(basename2(executable)))
|
|
17852
|
+
return null;
|
|
17853
|
+
try {
|
|
17854
|
+
return statSync(executable).isFile() ? executable : null;
|
|
17855
|
+
} catch {
|
|
17856
|
+
return null;
|
|
17857
|
+
}
|
|
17858
|
+
}
|
|
17848
17859
|
function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName, warnOnFallback) {
|
|
17849
17860
|
if (process.platform !== "win32")
|
|
17850
17861
|
return { command: bareCommand, args: [] };
|
|
@@ -17858,6 +17869,9 @@ function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName,
|
|
|
17858
17869
|
return { command: bareCommand, args: [] };
|
|
17859
17870
|
}
|
|
17860
17871
|
function resolveSignetMcpCommand() {
|
|
17872
|
+
const nativeBinary = resolveRunningNativeSignetBinary();
|
|
17873
|
+
if (nativeBinary)
|
|
17874
|
+
return { command: nativeBinary, args: [], env: { [SIGNET_MCP_STDIO_WORKER_ENV]: "1" } };
|
|
17861
17875
|
return resolvePackagedSignetCommand("signet-mcp", "dist", "mcp-stdio.js", true);
|
|
17862
17876
|
}
|
|
17863
17877
|
function isJsonObject(value) {
|
|
@@ -19913,7 +19927,7 @@ import { createRequire as createRequire22 } from "node:module";
|
|
|
19913
19927
|
import { homedir as homedir52 } from "node:os";
|
|
19914
19928
|
import { dirname as dirname62, join as join142, resolve as resolve82 } from "node:path";
|
|
19915
19929
|
import { homedir as homedir62, platform as platform22 } from "node:os";
|
|
19916
|
-
import { basename as
|
|
19930
|
+
import { basename as basename3, dirname as dirname72, resolve as resolve92 } from "node:path";
|
|
19917
19931
|
import { existsSync as existsSync16, readFileSync as readFileSync13, realpathSync as realpathSync2, statSync as statSync8 } from "node:fs";
|
|
19918
19932
|
import { dirname as dirname8, join as join16 } from "node:path";
|
|
19919
19933
|
import { homedir as homedir82 } from "node:os";
|
|
@@ -42899,7 +42913,7 @@ class OpenCodeConnector extends BaseConnector {
|
|
|
42899
42913
|
}
|
|
42900
42914
|
const resolvedMcp = resolveSignetMcpCommand();
|
|
42901
42915
|
const mcpCommand = [resolvedMcp.command, ...resolvedMcp.args];
|
|
42902
|
-
const environment = buildSignetRuntimeEnv();
|
|
42916
|
+
const environment = { ...buildSignetRuntimeEnv(), ...resolvedMcp.env };
|
|
42903
42917
|
if (apiKeyFile)
|
|
42904
42918
|
environment.SIGNET_API_KEY = `{file:${apiKeyFile}}`;
|
|
42905
42919
|
writeConfigValue(configPath, ["mcp", "signet"], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-opencode",
|
|
3
|
-
"version": "0.231.
|
|
3
|
+
"version": "0.231.2",
|
|
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.231.
|
|
29
|
-
"@signetai/core": "0.231.
|
|
28
|
+
"@signetai/connector-base": "0.231.2",
|
|
29
|
+
"@signetai/core": "0.231.2",
|
|
30
30
|
"jsonc-parser": "3.3.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|