@unerr-ai/unerr 0.1.1 → 0.1.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/cli.js +4 -4
- package/package.json +1 -1
- package/scripts/postinstall.mjs +29 -16
package/dist/cli.js
CHANGED
|
@@ -23185,7 +23185,7 @@ var init_response_envelope = __esm({
|
|
|
23185
23185
|
"use strict";
|
|
23186
23186
|
init_token_estimator();
|
|
23187
23187
|
init_signal_dedup();
|
|
23188
|
-
VERSION = "0.1.
|
|
23188
|
+
VERSION = "0.1.2";
|
|
23189
23189
|
updateNotification = null;
|
|
23190
23190
|
WIRE_STRIP_ALWAYS = /* @__PURE__ */ new Set([
|
|
23191
23191
|
"source",
|
|
@@ -42894,7 +42894,7 @@ async function startProxy(opts = {}) {
|
|
|
42894
42894
|
const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
42895
42895
|
const { ListToolsRequestSchema, CallToolRequestSchema } = await import("@modelcontextprotocol/sdk/types.js");
|
|
42896
42896
|
const server = new Server(
|
|
42897
|
-
{ name: "unerr-local", version: "0.1.
|
|
42897
|
+
{ name: "unerr-local", version: "0.1.2" },
|
|
42898
42898
|
{ capabilities: { tools: {} } }
|
|
42899
42899
|
);
|
|
42900
42900
|
const toolDefinitions = [...TOOL_DEFINITIONS];
|
|
@@ -43506,7 +43506,7 @@ ${signalFooter.trimEnd()}` : "";
|
|
|
43506
43506
|
result: {
|
|
43507
43507
|
protocolVersion: "2024-11-05",
|
|
43508
43508
|
capabilities: { tools: {} },
|
|
43509
|
-
serverInfo: { name: "unerr-local", version: "0.1.
|
|
43509
|
+
serverInfo: { name: "unerr-local", version: "0.1.2" }
|
|
43510
43510
|
}
|
|
43511
43511
|
};
|
|
43512
43512
|
}
|
|
@@ -56942,7 +56942,7 @@ async function bridgeAndExit(startBridge, sockPath2) {
|
|
|
56942
56942
|
}
|
|
56943
56943
|
}
|
|
56944
56944
|
var program = new Command();
|
|
56945
|
-
program.name("unerr").description("Code intelligence for AI agents").version("0.1.
|
|
56945
|
+
program.name("unerr").description("Code intelligence for AI agents").version("0.1.2").option("--ide <type>", "IDE type: cursor, vscode, claude-code, windsurf").option("--mcp", "Start in MCP server mode (stdio, no interactive prompts)").option(
|
|
56946
56946
|
"--daemon-child",
|
|
56947
56947
|
"Run as a daemon-managed child process (internal, set by unerrd)"
|
|
56948
56948
|
).showHelpAfterError("(use --help for available commands)").action(
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -30,8 +30,6 @@ const ci =
|
|
|
30
30
|
process.env.GITHUB_ACTIONS;
|
|
31
31
|
if (ci) process.exit(0);
|
|
32
32
|
|
|
33
|
-
if (!process.stderr.isTTY) process.exit(0);
|
|
34
|
-
|
|
35
33
|
const npmGlobal = process.env.npm_config_global;
|
|
36
34
|
if (npmGlobal !== undefined && npmGlobal !== "true") process.exit(0);
|
|
37
35
|
|
|
@@ -55,6 +53,19 @@ try {
|
|
|
55
53
|
}
|
|
56
54
|
if (!globalBin) process.exit(0);
|
|
57
55
|
|
|
56
|
+
// ANSI codes (use plain text if stderr is not a TTY)
|
|
57
|
+
const hasTTY = !!process.stderr.isTTY;
|
|
58
|
+
const W = hasTTY ? "\x1b[33m" : "";
|
|
59
|
+
const G = hasTTY ? "\x1b[32m" : "";
|
|
60
|
+
const B = hasTTY ? "\x1b[1m" : "";
|
|
61
|
+
const D = hasTTY ? "\x1b[2m" : "";
|
|
62
|
+
const R = hasTTY ? "\x1b[0m" : "";
|
|
63
|
+
const C = hasTTY ? "\x1b[36m" : "";
|
|
64
|
+
|
|
65
|
+
const stderr = (msg) => process.stderr.write(msg);
|
|
66
|
+
|
|
67
|
+
// ── Check PATH ───────────────────────────────────────────────
|
|
68
|
+
|
|
58
69
|
const pathSep = process.platform === "win32" ? ";" : ":";
|
|
59
70
|
const pathDirs = (process.env.PATH || "").split(pathSep);
|
|
60
71
|
const normalizedGlobalBin = globalBin.replace(/\/+$/, "");
|
|
@@ -62,7 +73,16 @@ const isOnPath = pathDirs.some(
|
|
|
62
73
|
(d) => d.replace(/\/+$/, "") === normalizedGlobalBin
|
|
63
74
|
);
|
|
64
75
|
|
|
65
|
-
if (isOnPath)
|
|
76
|
+
if (isOnPath) {
|
|
77
|
+
stderr(
|
|
78
|
+
`\n ${G}✓${R} ${B}unerr${R} is installed and ready to use.\n` +
|
|
79
|
+
` ${D}Run ${C}unerr${D} in any project to start.${R}\n\n`
|
|
80
|
+
);
|
|
81
|
+
process.exit(0);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// For the interactive warning/prompt, we need a TTY
|
|
85
|
+
if (!hasTTY) process.exit(0);
|
|
66
86
|
|
|
67
87
|
// ── Detect shell & version manager ──────────────────────────
|
|
68
88
|
|
|
@@ -72,16 +92,6 @@ const hasFnm = !!process.env.FNM_MULTISHELL_PATH;
|
|
|
72
92
|
const hasVolta = !!process.env.VOLTA_HOME;
|
|
73
93
|
const home = homedir();
|
|
74
94
|
|
|
75
|
-
// ANSI codes
|
|
76
|
-
const W = "\x1b[33m";
|
|
77
|
-
const G = "\x1b[32m";
|
|
78
|
-
const B = "\x1b[1m";
|
|
79
|
-
const D = "\x1b[2m";
|
|
80
|
-
const R = "\x1b[0m";
|
|
81
|
-
const C = "\x1b[36m";
|
|
82
|
-
|
|
83
|
-
const stderr = (msg) => process.stderr.write(msg);
|
|
84
|
-
|
|
85
95
|
// ── Shell RC helpers ─────────────────────────────────────────
|
|
86
96
|
|
|
87
97
|
function getRcPath() {
|
|
@@ -148,11 +158,14 @@ function getFixPayload() {
|
|
|
148
158
|
};
|
|
149
159
|
}
|
|
150
160
|
|
|
151
|
-
// Generic: direct PATH export
|
|
161
|
+
// Generic: direct PATH export — use $HOME instead of absolute home path for portability
|
|
162
|
+
const portableBin = normalizedGlobalBin.startsWith(home)
|
|
163
|
+
? normalizedGlobalBin.replace(home, "$HOME")
|
|
164
|
+
: normalizedGlobalBin;
|
|
152
165
|
const exportLine =
|
|
153
166
|
shell === "fish"
|
|
154
|
-
? `set -gx PATH ${
|
|
155
|
-
: `export PATH="${
|
|
167
|
+
? `set -gx PATH ${portableBin} $PATH`
|
|
168
|
+
: `export PATH="${portableBin}:$PATH"`;
|
|
156
169
|
|
|
157
170
|
return {
|
|
158
171
|
lines: ["", "# npm global bin (added by unerr postinstall)", exportLine],
|