@lightupai/polaris 0.0.19 → 0.0.20
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/package.json +1 -1
- package/src/cli/cli.ts +17 -6
package/package.json
CHANGED
package/src/cli/cli.ts
CHANGED
|
@@ -109,15 +109,26 @@ function appToApi(appUrl: string): string {
|
|
|
109
109
|
async function install(participantId?: string) {
|
|
110
110
|
await mkdir(CLAUDE_DIR, { recursive: true });
|
|
111
111
|
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
// Ensure the package is globally installed so polaris-mcp binary persists
|
|
113
|
+
console.log(" Installing @lightupai/polaris globally...");
|
|
114
|
+
const npmInstall = Bun.spawnSync(["npm", "install", "-g", "@lightupai/polaris@latest"], {
|
|
115
|
+
stdout: "ignore",
|
|
116
|
+
stderr: "pipe",
|
|
117
|
+
});
|
|
118
|
+
if (npmInstall.exitCode !== 0) {
|
|
119
|
+
console.error(" Warning: global install failed. MCP server may not work.");
|
|
120
|
+
console.error(" Run manually: npm install -g @lightupai/polaris");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Find the globally installed polaris-mcp binary
|
|
124
|
+
const whichResult = Bun.spawnSync(["which", "polaris-mcp"], { stdout: "pipe" });
|
|
125
|
+
const mcpBin = whichResult.stdout.toString().trim() || "polaris-mcp";
|
|
126
|
+
|
|
116
127
|
const mcpConfig = {
|
|
117
128
|
mcpServers: {
|
|
118
129
|
polaris: {
|
|
119
|
-
command:
|
|
120
|
-
args: [
|
|
130
|
+
command: mcpBin,
|
|
131
|
+
args: [],
|
|
121
132
|
env: {
|
|
122
133
|
POLARIS_DAEMON_URL: "http://127.0.0.1:4322",
|
|
123
134
|
},
|