@aexol/spectral 0.1.9 → 0.2.1

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.
@@ -61,7 +61,7 @@ export async function performLogin(opts) {
61
61
  }
62
62
  export async function runLogin() {
63
63
  process.stdout.write(pc.bold("Spectral login\n"));
64
- process.stdout.write(pc.dim("Authenticate against the Aexol MCP backend. Credentials are stored at ~/.spectral/config.json (chmod 600).\n\n"));
64
+ process.stdout.write(pc.dim(`Authenticate against the Aexol MCP backend. Credentials are stored at ${getConfigFile()} (chmod 600).\n\n`));
65
65
  const defaultUrl = process.env.SPECTRAL_MCP_URL ?? DEFAULT_API_URL;
66
66
  let apiUrl;
67
67
  let teamApiKey;
@@ -15,7 +15,7 @@
15
15
  * backend is unreachable we log a warning and return, leaving pi to start
16
16
  * without Aexol tools rather than crashing the whole agent.
17
17
  */
18
- import { getApiUrl, readConfig } from "../config.js";
18
+ import { getApiUrl, getConfigFile, readConfig } from "../config.js";
19
19
  import { AexolMcpClient, AexolMcpError } from "../mcp-client.js";
20
20
  /**
21
21
  * Render a backend tool result into a single string for pi.
@@ -58,7 +58,7 @@ export default async function aexolMcpExtension(pi) {
58
58
  const cfg = await readConfig();
59
59
  if (!cfg) {
60
60
  // Pre-flight in cli.ts should have caught this. Logging is enough.
61
- process.stderr.write("[aexol-mcp] No ~/.spectral/config.json found; Aexol tools disabled. Run `spectral login`.\n");
61
+ process.stderr.write(`[aexol-mcp] No config found at ${getConfigFile()}; Aexol tools disabled. Run \`spectral login\`.\n`);
62
62
  return;
63
63
  }
64
64
  const apiUrl = getApiUrl(cfg.apiUrl);
@@ -29,6 +29,7 @@ import Database from "better-sqlite3";
29
29
  import { randomUUID } from "node:crypto";
30
30
  import { mkdirSync, readFileSync } from "node:fs";
31
31
  import { dirname, join } from "node:path";
32
+ import { getConfigDir } from "../config.js";
32
33
  import { stripJsoncComments } from "../studio-binding.js";
33
34
  /**
34
35
  * Schema version. Bump + the on-open migration drops & recreates every table.
@@ -527,7 +528,7 @@ export function preflightSqlite(dbPath) {
527
528
  ok: false,
528
529
  error: `Failed to load native sqlite module (${msg}).\n` +
529
530
  ` This usually means the native binary couldn't be built for your Node.js version.\n` +
530
- ` Try: cd ~/.spectral && npm rebuild better-sqlite3\n` +
531
+ ` Try: cd ${getConfigDir()} && npm rebuild better-sqlite3\n` +
531
532
  ` Or reinstall: npm install -g @aexol/spectral`,
532
533
  };
533
534
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/spectral",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "Always-on coding agent for Aexol — branded pi wrapper with relay-based browser access.",
5
5
  "type": "module",
6
6
  "private": false,