@signetai/connector-forge 0.231.1 → 0.232.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.
Files changed (2) hide show
  1. package/dist/index.js +58 -46
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import { join as join5, resolve as resolve4 } from "node:path";
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { existsSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
19
19
  import { homedir } from "node:os";
20
- import { dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
20
+ import { basename as basename2, dirname as dirname2, isAbsolute, join as join3, relative, sep } from "node:path";
21
21
  import { createRequire } from "node:module";
22
22
  import { dirname, join, resolve } from "node:path";
23
23
  import { fileURLToPath } from "node:url";
@@ -32,29 +32,28 @@ import { promisify } from "node:util";
32
32
  import { createHash } from "node:crypto";
33
33
  import { homedir as homedir2 } from "node:os";
34
34
  import { join as join2, resolve as resolve2 } from "node:path";
35
- import { constants as fsConstants, fstatSync, statfsSync as statfsSync2 } from "node:fs";
36
35
  import {
37
- closeSync as closeSync3,
36
+ closeSync as closeSync4,
38
37
  existsSync as existsSync12,
39
- fsyncSync as fsyncSync2,
38
+ fsyncSync as fsyncSync3,
40
39
  mkdirSync as mkdirSync6,
41
- openSync as openSync3,
40
+ openSync as openSync4,
42
41
  readFileSync as readFileSync9,
43
42
  renameSync as renameSync3,
44
43
  rmSync as rmSync4,
45
44
  statSync as statSync5,
46
- writeSync
45
+ writeSync as writeSync2
47
46
  } from "node:fs";
48
47
  import { homedir as homedir4 } from "node:os";
49
- import { dirname as dirname5, join as join13, resolve as resolve7 } from "node:path";
48
+ import { dirname as dirname5, join as join13, resolve as resolve6 } from "node:path";
50
49
  import { createRequire as createRequire2 } from "node:module";
51
50
  import { homedir as homedir5 } from "node:os";
52
- import { dirname as dirname6, join as join14, resolve as resolve8 } from "node:path";
51
+ import { dirname as dirname6, join as join15, resolve as resolve7 } from "node:path";
53
52
  import { homedir as homedir6, platform as platform2 } from "node:os";
54
- import { basename, dirname as dirname7, resolve as resolve9 } from "node:path";
53
+ import { basename, dirname as dirname7, resolve as resolve8 } from "node:path";
55
54
  import { homedir as homedir8 } from "node:os";
56
55
  import { existsSync as existsSync18, lstatSync as lstatSync3, mkdirSync as mkdirSync10, readdirSync as readdirSync9, symlinkSync as symlinkSync2, unlinkSync as unlinkSync2 } from "node:fs";
57
- import { join as join18 } from "node:path";
56
+ import { join as join19 } from "node:path";
58
57
  var __defProp = Object.defineProperty;
59
58
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
60
59
  var __esm = (fn, res, err) => () => {
@@ -17385,6 +17384,8 @@ function expandHome(p, home = homedir2()) {
17385
17384
  return join2(home, p.slice(2));
17386
17385
  return p;
17387
17386
  }
17387
+ var PRIVATE_SEGMENTS = new Set([".daemon", ".secrets", "memory"]);
17388
+ var PRIVATE_ROOT_DIRS = new Set(["runtime", "data", "transcripts", "cache"]);
17388
17389
  var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
17389
17390
  var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
17390
17391
  var SIGNET_GIT_PROTECTED_PATHS = [
@@ -17396,6 +17397,7 @@ var SIGNET_GIT_PROTECTED_PATHS = [
17396
17397
  "files",
17397
17398
  "runtime",
17398
17399
  "workspace-layout.json",
17400
+ ".workspace-layout-upgrade.json",
17399
17401
  "node_modules",
17400
17402
  ":(glob)**/node_modules/**",
17401
17403
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME}`,
@@ -17436,11 +17438,12 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS = [
17436
17438
  ".daemon/",
17437
17439
  ".secrets/",
17438
17440
  ".shadow/",
17439
- "cache/",
17440
- "data/",
17441
- "files/",
17442
- "runtime/",
17441
+ "/cache/",
17442
+ "/data/",
17443
+ "/files/",
17444
+ "/runtime/",
17443
17445
  "workspace-layout.json",
17446
+ ".workspace-layout-upgrade.json",
17444
17447
  "node_modules/",
17445
17448
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME}/`,
17446
17449
  "memory/memories.db*",
@@ -17460,10 +17463,6 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS = [
17460
17463
  "*.sqlite",
17461
17464
  "*.sqlite3"
17462
17465
  ];
17463
- var DESCRIPTOR_ROOT = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : undefined;
17464
- var DIRECTORY_FLAGS = fsConstants.O_RDONLY | (fsConstants.O_DIRECTORY ?? 0) | (fsConstants.O_NOFOLLOW ?? 0);
17465
- var FILE_FLAGS = fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0) | (fsConstants.O_NONBLOCK ?? 0);
17466
- var NOFOLLOW = fsConstants.O_NOFOLLOW ?? 0;
17467
17466
  var PROTECTION_COMPONENT_IDS = [
17468
17467
  "root-authored",
17469
17468
  "skills",
@@ -17591,7 +17590,7 @@ function resolveSignetDaemonUrl(opts = {}) {
17591
17590
  var WORKSPACE_ENV_KEYS = ["SIGNET_PATH", "SIGNET_WORKSPACE"];
17592
17591
  var DEFAULT_AGENTS_DIRNAME = ".agents";
17593
17592
  function normalizeWorkspacePath(pathValue, home = homedir4()) {
17594
- return resolve7(expandHome(pathValue.trim(), home));
17593
+ return resolve6(expandHome(pathValue.trim(), home));
17595
17594
  }
17596
17595
  function readTrimmedEnv(env, name) {
17597
17596
  const value = env[name];
@@ -17695,18 +17694,18 @@ try {
17695
17694
  const esmRequire = createRequire2(import.meta.url);
17696
17695
  native = esmRequire("@signet/native");
17697
17696
  } catch {}
17698
- var GRAPHIQ_DEFAULT_INSTALL_DIR = join14(homedir5(), ".local", "bin");
17697
+ var GRAPHIQ_DEFAULT_INSTALL_DIR = join15(homedir5(), ".local", "bin");
17699
17698
  var DEFAULT_DISCORD_DESKTOP_CACHE_PATH = defaultDiscordDesktopCachePath();
17700
17699
  var DEFAULT_GITHUB_RESOURCE_TYPES = ["issues", "pulls", "discussions", "docs"];
17701
17700
  var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
17702
17701
  function defaultDiscordDesktopCachePath() {
17703
17702
  switch (platform2()) {
17704
17703
  case "darwin":
17705
- return resolve9(homedir6(), "Library", "Application Support", "discord");
17704
+ return resolve8(homedir6(), "Library", "Application Support", "discord");
17706
17705
  case "win32":
17707
- return resolve9(process.env.APPDATA || resolve9(homedir6(), "AppData", "Roaming"), "discord");
17706
+ return resolve8(process.env.APPDATA || resolve8(homedir6(), "AppData", "Roaming"), "discord");
17708
17707
  default:
17709
- return resolve9(process.env.XDG_CONFIG_HOME || resolve9(homedir6(), ".config"), "discord");
17708
+ return resolve8(process.env.XDG_CONFIG_HOME || resolve8(homedir6(), ".config"), "discord");
17710
17709
  }
17711
17710
  }
17712
17711
  var IDENTITY_FILES = {
@@ -17777,7 +17776,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
17777
17776
  if (!existsSync18(sourceDir)) {
17778
17777
  return result;
17779
17778
  }
17780
- const targetParent = join18(targetDir, "..");
17779
+ const targetParent = join19(targetDir, "..");
17781
17780
  if (!existsSync18(targetParent)) {
17782
17781
  mkdirSync10(targetParent, { recursive: true });
17783
17782
  }
@@ -17795,8 +17794,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
17795
17794
  return result;
17796
17795
  }
17797
17796
  for (const entry of entries) {
17798
- const srcPath = join18(sourceDir, entry);
17799
- const destPath = join18(targetDir, entry);
17797
+ const srcPath = join19(sourceDir, entry);
17798
+ const destPath = join19(targetDir, entry);
17800
17799
  try {
17801
17800
  const src = lstatSync3(srcPath);
17802
17801
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -17981,6 +17980,17 @@ function atomicWriteJson(path, data, indent = 2) {
17981
17980
  atomicWriteText(path, `${JSON.stringify(data, null, indent)}
17982
17981
  `);
17983
17982
  }
17983
+ var SIGNET_MCP_STDIO_WORKER_ENV = "SIGNET_MCP_STDIO_WORKER";
17984
+ function resolveRunningNativeSignetBinary() {
17985
+ const executable = process.execPath;
17986
+ if (!/^signet(?:\.exe)?$/i.test(basename2(executable)))
17987
+ return null;
17988
+ try {
17989
+ return statSync(executable).isFile() ? executable : null;
17990
+ } catch {
17991
+ return null;
17992
+ }
17993
+ }
17984
17994
  function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName, warnOnFallback) {
17985
17995
  if (process.platform !== "win32")
17986
17996
  return { command: bareCommand, args: [] };
@@ -17994,6 +18004,9 @@ function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName,
17994
18004
  return { command: bareCommand, args: [] };
17995
18005
  }
17996
18006
  function resolveSignetMcpCommand() {
18007
+ const nativeBinary = resolveRunningNativeSignetBinary();
18008
+ if (nativeBinary)
18009
+ return { command: nativeBinary, args: [], env: { [SIGNET_MCP_STDIO_WORKER_ENV]: "1" } };
17997
18010
  return resolvePackagedSignetCommand("signet-mcp", "dist", "mcp-stdio.js", true);
17998
18011
  }
17999
18012
  function isJsonObject(value) {
@@ -18056,14 +18069,13 @@ import { promisify as promisify2 } from "node:util";
18056
18069
  import { createHash as createHash2 } from "node:crypto";
18057
18070
  import { homedir as homedir22 } from "node:os";
18058
18071
  import { join as join22, resolve as resolve22 } from "node:path";
18059
- import { constants as fsConstants2, fstatSync as fstatSync2, statfsSync as statfsSync22 } from "node:fs";
18060
18072
  import { createRequire as createRequire22 } from "node:module";
18061
18073
  import { homedir as homedir52 } from "node:os";
18062
- import { dirname as dirname62, join as join142, resolve as resolve82 } from "node:path";
18074
+ import { dirname as dirname62, join as join152, resolve as resolve72 } from "node:path";
18063
18075
  import { homedir as homedir62, platform as platform22 } from "node:os";
18064
- import { basename as basename2, dirname as dirname72, resolve as resolve92 } from "node:path";
18076
+ import { basename as basename3, dirname as dirname72, resolve as resolve82 } from "node:path";
18065
18077
  import { existsSync as existsSync16, readFileSync as readFileSync13, realpathSync as realpathSync2, statSync as statSync8 } from "node:fs";
18066
- import { dirname as dirname8, join as join16 } from "node:path";
18078
+ import { dirname as dirname8, join as join17 } from "node:path";
18067
18079
  import { homedir as homedir82 } from "node:os";
18068
18080
  var __defProp2 = Object.defineProperty;
18069
18081
  var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -35395,6 +35407,8 @@ function expandHome2(p, home = homedir22()) {
35395
35407
  return join22(home, p.slice(2));
35396
35408
  return p;
35397
35409
  }
35410
+ var PRIVATE_SEGMENTS2 = new Set([".daemon", ".secrets", "memory"]);
35411
+ var PRIVATE_ROOT_DIRS2 = new Set(["runtime", "data", "transcripts", "cache"]);
35398
35412
  var SIGNET_SOURCE_CHECKOUT_DIRNAME2 = "signetai";
35399
35413
  var SIGNET_GIT_ALLOWED_DIRECTORIES2 = ["skills", "tools", "dreaming"];
35400
35414
  var SIGNET_GIT_PROTECTED_PATHS2 = [
@@ -35406,6 +35420,7 @@ var SIGNET_GIT_PROTECTED_PATHS2 = [
35406
35420
  "files",
35407
35421
  "runtime",
35408
35422
  "workspace-layout.json",
35423
+ ".workspace-layout-upgrade.json",
35409
35424
  "node_modules",
35410
35425
  ":(glob)**/node_modules/**",
35411
35426
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME2}`,
@@ -35446,11 +35461,12 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS2 = [
35446
35461
  ".daemon/",
35447
35462
  ".secrets/",
35448
35463
  ".shadow/",
35449
- "cache/",
35450
- "data/",
35451
- "files/",
35452
- "runtime/",
35464
+ "/cache/",
35465
+ "/data/",
35466
+ "/files/",
35467
+ "/runtime/",
35453
35468
  "workspace-layout.json",
35469
+ ".workspace-layout-upgrade.json",
35454
35470
  "node_modules/",
35455
35471
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME2}/`,
35456
35472
  "memory/memories.db*",
@@ -35470,10 +35486,6 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS2 = [
35470
35486
  "*.sqlite",
35471
35487
  "*.sqlite3"
35472
35488
  ];
35473
- var DESCRIPTOR_ROOT2 = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : undefined;
35474
- var DIRECTORY_FLAGS2 = fsConstants2.O_RDONLY | (fsConstants2.O_DIRECTORY ?? 0) | (fsConstants2.O_NOFOLLOW ?? 0);
35475
- var FILE_FLAGS2 = fsConstants2.O_RDONLY | (fsConstants2.O_NOFOLLOW ?? 0) | (fsConstants2.O_NONBLOCK ?? 0);
35476
- var NOFOLLOW2 = fsConstants2.O_NOFOLLOW ?? 0;
35477
35489
  var PROTECTION_COMPONENT_IDS2 = [
35478
35490
  "root-authored",
35479
35491
  "skills",
@@ -35531,18 +35543,18 @@ try {
35531
35543
  const esmRequire = createRequire22(import.meta.url);
35532
35544
  native2 = esmRequire("@signet/native");
35533
35545
  } catch {}
35534
- var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join142(homedir52(), ".local", "bin");
35546
+ var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join152(homedir52(), ".local", "bin");
35535
35547
  var DEFAULT_DISCORD_DESKTOP_CACHE_PATH2 = defaultDiscordDesktopCachePath2();
35536
35548
  var DEFAULT_GITHUB_RESOURCE_TYPES2 = ["issues", "pulls", "discussions", "docs"];
35537
35549
  var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
35538
35550
  function defaultDiscordDesktopCachePath2() {
35539
35551
  switch (platform22()) {
35540
35552
  case "darwin":
35541
- return resolve92(homedir62(), "Library", "Application Support", "discord");
35553
+ return resolve82(homedir62(), "Library", "Application Support", "discord");
35542
35554
  case "win32":
35543
- return resolve92(process.env.APPDATA || resolve92(homedir62(), "AppData", "Roaming"), "discord");
35555
+ return resolve82(process.env.APPDATA || resolve82(homedir62(), "AppData", "Roaming"), "discord");
35544
35556
  default:
35545
- return resolve92(process.env.XDG_CONFIG_HOME || resolve92(homedir62(), ".config"), "discord");
35557
+ return resolve82(process.env.XDG_CONFIG_HOME || resolve82(homedir62(), ".config"), "discord");
35546
35558
  }
35547
35559
  }
35548
35560
  var IDENTITY_MODES = ["managed", "off"];
@@ -35645,7 +35657,7 @@ function hasValidIdentity(basePath) {
35645
35657
  if (mode !== "managed")
35646
35658
  return true;
35647
35659
  for (const path of resolveRequiredIdentityPaths(basePath)) {
35648
- if (!existsSync16(join16(basePath, path))) {
35660
+ if (!existsSync16(join17(basePath, path))) {
35649
35661
  return false;
35650
35662
  }
35651
35663
  }
@@ -35653,7 +35665,7 @@ function hasValidIdentity(basePath) {
35653
35665
  }
35654
35666
  function resolveRequiredIdentityPaths(basePath) {
35655
35667
  const legacyRequired = () => REQUIRED_IDENTITY_KEYS2.map((key) => IDENTITY_FILES2[key].path);
35656
- const agentYaml = join16(basePath, "agent.yaml");
35668
+ const agentYaml = join17(basePath, "agent.yaml");
35657
35669
  if (!existsSync16(agentYaml))
35658
35670
  return legacyRequired();
35659
35671
  try {
@@ -35700,7 +35712,7 @@ function resolveIdentityModeFromConfig(config) {
35700
35712
  return "managed";
35701
35713
  }
35702
35714
  function loadIdentityMode(agentsDir) {
35703
- const agentYaml = join16(agentsDir, "agent.yaml");
35715
+ const agentYaml = join17(agentsDir, "agent.yaml");
35704
35716
  if (!existsSync16(agentYaml))
35705
35717
  return "managed";
35706
35718
  try {
@@ -35766,7 +35778,7 @@ function buildMcpServer(basePath) {
35766
35778
  return {
35767
35779
  command: mcp.command,
35768
35780
  ...mcp.args && mcp.args.length > 0 ? { args: mcp.args } : {},
35769
- env: buildSignetRuntimeEnv({ basePath })
35781
+ env: { ...buildSignetRuntimeEnv({ basePath }), ...mcp.env }
35770
35782
  };
35771
35783
  }
35772
35784
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-forge",
3
- "version": "0.231.1",
3
+ "version": "0.232.0",
4
4
  "description": "Signet connector for ForgeCode - installs MCP, identity, and skills integration",
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.231.1",
28
- "@signetai/core": "0.231.1"
27
+ "@signetai/connector-base": "0.232.0",
28
+ "@signetai/core": "0.232.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",