@signetai/connector-gemini 0.140.4 → 0.140.5

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 +15 -5
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -10484,16 +10484,26 @@ function resolveSignetWorkspacePath(home2 = homedir()) {
10484
10484
  const configured = readManagedTrimmedEnv("SIGNET_PATH");
10485
10485
  if (configured)
10486
10486
  return resolve(expandHome(configured));
10487
+ const defaultWorkspace = join3(home2, ".agents");
10487
10488
  const configHome = readManagedTrimmedEnv("XDG_CONFIG_HOME") ?? join3(home2, ".config");
10488
10489
  const workspaceConfigPath = join3(configHome, "signet", "workspace.json");
10489
10490
  if (!existsSync(workspaceConfigPath))
10490
- return join3(home2, ".agents");
10491
+ return defaultWorkspace;
10492
+ let raw;
10491
10493
  try {
10492
- const raw = JSON.parse(readFileSync(workspaceConfigPath, "utf8"));
10493
- return typeof raw.workspace === "string" && raw.workspace.trim().length > 0 ? resolve(expandHome(raw.workspace.trim())) : join3(home2, ".agents");
10494
- } catch {
10495
- return join3(home2, ".agents");
10494
+ raw = JSON.parse(readFileSync(workspaceConfigPath, "utf8"));
10495
+ } catch (err) {
10496
+ const detail = err instanceof Error ? err.message : String(err);
10497
+ throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: ${detail}`);
10498
+ }
10499
+ if (typeof raw !== "object" || raw === null || !("workspace" in raw)) {
10500
+ throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: missing workspace`);
10501
+ }
10502
+ const workspace = raw.workspace;
10503
+ if (typeof workspace !== "string" || workspace.trim().length === 0) {
10504
+ throw new Error(`Invalid Signet workspace config at ${workspaceConfigPath}: workspace must be a non-empty string`);
10496
10505
  }
10506
+ return resolve(expandHome(workspace.trim()));
10497
10507
  }
10498
10508
 
10499
10509
  // ../../../platform/core/dist/index.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-gemini",
3
- "version": "0.140.4",
3
+ "version": "0.140.5",
4
4
  "description": "Signet connector for Gemini 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.140.4",
28
- "@signetai/core": "0.140.4"
27
+ "@signetai/connector-base": "0.140.5",
28
+ "@signetai/core": "0.140.5"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",