@signetai/connector-forge 0.199.2 → 0.199.4

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 +23 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  readlinkSync,
9
9
  rmSync as rmSync2,
10
10
  unlinkSync as unlinkSync3,
11
- writeFileSync as writeFileSync3
11
+ writeFileSync as writeFileSync2
12
12
  } from "node:fs";
13
13
  import { homedir as homedir6 } from "node:os";
14
14
  import { join as join7, resolve as resolve3 } from "node:path";
15
15
 
16
16
  // ../../../libs/connector-base/dist/index.js
17
17
  import { randomBytes } from "node:crypto";
18
- import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
18
+ import { existsSync, readFileSync, renameSync as renameSync2, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
19
19
  import { homedir } from "node:os";
20
20
  import { dirname as dirname5, isAbsolute, join as join3, relative, sep } from "node:path";
21
21
  import { createRequire } from "node:module";
@@ -24,7 +24,18 @@ import { fileURLToPath } from "node:url";
24
24
  import { createHash } from "node:crypto";
25
25
  import { homedir as homedir2 } from "os";
26
26
  import { join as join2 } from "path";
27
- import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs";
27
+ import {
28
+ closeSync,
29
+ existsSync as existsSync4,
30
+ fsyncSync,
31
+ mkdirSync as mkdirSync2,
32
+ openSync,
33
+ readFileSync as readFileSync3,
34
+ renameSync,
35
+ rmSync,
36
+ statSync,
37
+ writeSync
38
+ } from "node:fs";
28
39
  import { homedir as homedir3 } from "node:os";
29
40
  import { dirname as dirname2, join as join5, resolve } from "node:path";
30
41
  import { createRequire as createRequire2 } from "node:module";
@@ -12476,8 +12487,7 @@ function isRecord4(value) {
12476
12487
  function getWorkspaceConfigPath(env = process.env, home = homedir3()) {
12477
12488
  return join5(readConfigHome(env, home), "signet", "workspace.json");
12478
12489
  }
12479
- function readConfiguredWorkspacePath(env = process.env, home = homedir3(), options = {}) {
12480
- const strict = options.strict ?? false;
12490
+ function readConfiguredWorkspacePath(env = process.env, home = homedir3(), _options = {}) {
12481
12491
  const configPath = getWorkspaceConfigPath(env, home);
12482
12492
  if (!existsSync4(configPath))
12483
12493
  return null;
@@ -12485,33 +12495,25 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir3(), optio
12485
12495
  try {
12486
12496
  raw = JSON.parse(readFileSync3(configPath, "utf-8"));
12487
12497
  } catch (err) {
12488
- if (strict) {
12489
- const detail = err instanceof Error ? err.message : String(err);
12490
- throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
12491
- }
12492
- return null;
12498
+ const detail = err instanceof Error ? err.message : String(err);
12499
+ throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
12493
12500
  }
12494
12501
  if (!isRecord4(raw) || !("workspace" in raw)) {
12495
- if (strict)
12496
- throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
12497
- return null;
12502
+ throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
12498
12503
  }
12499
12504
  const workspace = raw.workspace;
12500
12505
  if (typeof workspace !== "string" || workspace.trim().length === 0) {
12501
- if (strict)
12502
- throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
12503
- return null;
12506
+ throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
12504
12507
  }
12505
12508
  return normalizeWorkspacePath(workspace, home);
12506
12509
  }
12507
12510
  function resolveWorkspacePath(options = {}) {
12508
12511
  const env = options.env ?? process.env;
12509
12512
  const home = options.home ?? homedir3();
12510
- const strict = options.strict ?? false;
12511
12513
  const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
12512
12514
  const configPath = getWorkspaceConfigPath(env, home);
12513
12515
  const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
12514
- const configValue = readConfiguredWorkspacePath(env, home, { strict: envPath ? false : strict });
12516
+ const configValue = readConfiguredWorkspacePath(env, home);
12515
12517
  if (envPath) {
12516
12518
  return {
12517
12519
  path: envPath,
@@ -12783,7 +12785,7 @@ class BaseConnector {
12783
12785
  const tmp = join3(basePath, `.${randomBytes(6).toString("hex")}.tmp`);
12784
12786
  try {
12785
12787
  writeFileSync(tmp, cleaned, "utf-8");
12786
- renameSync(tmp, agentsPath);
12788
+ renameSync2(tmp, agentsPath);
12787
12789
  } catch (err) {
12788
12790
  try {
12789
12791
  unlinkSync2(tmp);
@@ -12847,7 +12849,7 @@ function atomicWriteText(path, content, mode) {
12847
12849
  }
12848
12850
  try {
12849
12851
  writeFileSync(tmp, content, { encoding: "utf-8", mode: writeMode });
12850
- renameSync(tmp, path);
12852
+ renameSync2(tmp, path);
12851
12853
  } catch (err) {
12852
12854
  try {
12853
12855
  unlinkSync2(tmp);
@@ -25654,7 +25656,7 @@ class ForgeConnector extends BaseConnector {
25654
25656
  const body = extras ? `${userContent}${extras}` : userContent;
25655
25657
  const header = this.generateHeader(sourcePath, this.name);
25656
25658
  const targetPath = this.getAgentsPath();
25657
- writeFileSync3(targetPath, `# ${SIGNET_FORGE_MARKER}
25659
+ writeFileSync2(targetPath, `# ${SIGNET_FORGE_MARKER}
25658
25660
  ${header}${body}
25659
25661
  `, "utf-8");
25660
25662
  return targetPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-forge",
3
- "version": "0.199.2",
3
+ "version": "0.199.4",
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.199.2",
28
- "@signetai/core": "0.199.2"
27
+ "@signetai/connector-base": "0.199.4",
28
+ "@signetai/core": "0.199.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",